home *** CD-ROM | disk | FTP | other *** search
/ MacFormat España 14 / MacFormat n. 14 (Spain) / MacFormat 14.bin / C de cerca / Codewarrior Lite / MacOS Support / Headers / Universal Headers / OCEAuthDir.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-07-06  |  179.0 KB  |  4,625 lines

  1. /*
  2.      File:        OCEAuthDir.h
  3.  
  4.      Contains:    Apple Open Collaboration Environment Authentication Interfaces.
  5.  
  6.      Version:    Technology:    AOCE Toolbox 1.02
  7.                  Package:    Universal Interfaces 2.1 in “MPW Latest” on ETO #18
  8.  
  9.      Copyright:    © 1984-1995 by Apple Computer, Inc.
  10.                  All rights reserved.
  11.  
  12.      Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  13.                  stack.  Include the file and version information (from above)
  14.                  in the problem description and send to:
  15.                      Internet:    apple.bugs@applelink.apple.com
  16.                      AppleLink:    APPLE.BUGS
  17.  
  18. */
  19.  
  20. #ifndef __OCEAUTHDIR__
  21. #define __OCEAUTHDIR__
  22.  
  23.  
  24. #ifndef __EVENTS__
  25. #include <Events.h>
  26. #endif
  27. /*    #include <Types.h>                                            */
  28. /*        #include <ConditionalMacros.h>                            */
  29. /*    #include <Quickdraw.h>                                        */
  30. /*        #include <MixedMode.h>                                    */
  31. /*        #include <QuickdrawText.h>                                */
  32. /*    #include <OSUtils.h>                                        */
  33. /*        #include <Memory.h>                                        */
  34.  
  35. #ifndef __NOTIFICATION__
  36. #include <Notification.h>
  37. #endif
  38.  
  39. #ifndef __APPLEEVENTS__
  40. #include <AppleEvents.h>
  41. #endif
  42. /*    #include <Errors.h>                                            */
  43. /*    #include <EPPC.h>                                            */
  44. /*        #include <AppleTalk.h>                                    */
  45. /*        #include <Files.h>                                        */
  46. /*            #include <Finder.h>                                    */
  47. /*        #include <PPCToolbox.h>                                    */
  48. /*        #include <Processes.h>                                    */
  49.  
  50. #ifndef __APPLETALK__
  51. #include <AppleTalk.h>
  52. #endif
  53.  
  54. #ifndef __FILES__
  55. #include <Files.h>
  56. #endif
  57.  
  58. #ifndef __OSUTILS__
  59. #include <OSUtils.h>
  60. #endif
  61.  
  62. #ifndef __TYPES__
  63. #include <Types.h>
  64. #endif
  65.  
  66. #ifndef __OCE__
  67. #include <OCE.h>
  68. #endif
  69. /*    #include <Aliases.h>                                        */
  70. /*    #include <Script.h>                                            */
  71. /*        #include <IntlResources.h>                                */
  72.  
  73. #ifdef __cplusplus
  74. extern "C" {
  75. #endif
  76.  
  77. #if PRAGMA_ALIGN_SUPPORTED
  78. #pragma options align=mac68k
  79. #endif
  80.  
  81. #if PRAGMA_IMPORT_SUPPORTED
  82. #pragma import on
  83. #endif
  84.  
  85.  
  86. enum {
  87.     kRC4KeySizeInBytes            = 8,                            /* size of an RC4 key */
  88.     kRefNumUnknown                = 0
  89. };
  90.  
  91. enum {
  92.     kEnumDistinguishedNameBit,
  93.     kEnumAliasBit,
  94.     kEnumPseudonymBit,
  95.     kEnumDNodeBit,
  96.     kEnumInvisibleBit
  97. };
  98.  
  99. /* Values of DirEnumChoices */
  100. enum {
  101.     kEnumDistinguishedNameMask    = 1L << kEnumDistinguishedNameBit,
  102.     kEnumAliasMask                = 1L << kEnumAliasBit,
  103.     kEnumPseudonymMask            = 1L << kEnumPseudonymBit,
  104.     kEnumDNodeMask                = 1L << kEnumDNodeBit,
  105.     kEnumInvisibleMask            = 1L << kEnumInvisibleBit,
  106.     kEnumAllMask                = (kEnumDistinguishedNameMask | kEnumAliasMask | kEnumPseudonymMask | kEnumDNodeMask | kEnumInvisibleMask)
  107. };
  108.  
  109. typedef unsigned long DirEnumChoices;
  110.  
  111. /* Values of DirSortOption */
  112.  
  113. enum {
  114.     kSortByName                    = 0,
  115.     kSortByType                    = 1
  116. };
  117.  
  118. /* Values of DirSortDirection */
  119. enum {
  120.     kSortForwards                = 0,
  121.     kSortBackwards                = 1
  122. };
  123.  
  124. /* Values of DirMatchWith */
  125. enum {
  126.     kMatchAll,
  127.     kExactMatch,
  128.     kBeginsWith,
  129.     kEndingWith,
  130.     kContaining
  131. };
  132.  
  133. typedef unsigned char DirMatchWith;
  134.  
  135.  
  136. enum {
  137.     kCurrentOCESortVersion        = 1
  138. };
  139.  
  140. /*  Access controls are implemented on three levels:
  141.  *      DNode, Record, and Attribute Type levels
  142.  *  Some access control bits apply to the container itself, and some apply to its contents.
  143.  *
  144.  *  The Catalog Toolbox supports six functions.  These calls are:
  145.  *  DSGetDNodeAccessControl : to get Access Controls at the DNode level
  146.  *    DSGetRecordAccessControl  : to get Access Controls at the record level
  147.  *  DSGetAttributeAccessControl : to get Access Privileges at the attribute type level
  148.  * 
  149.  *  The GetXXXAccessControl calls will return access control masks for various categories
  150.  *  of users.  Please refer to the access control document for a description of the
  151.  *  categories of users.  In general these are:
  152.  *      ThisRecordOwner         - means the identity of the record itself
  153.  *      Friends                  - means any one of the assigned friends for the record
  154.  *      AuthenticatedInDNode     - means any valid user that is an authenticated entity
  155.  *          in the DNode in which this record is located
  156.  *      AuthenticatedInDirectory - means any valid authenticated catalog user
  157.  *      Guest                      - means an unauthenticated user.
  158.  *  Bit masks for various permitted access controls are defined below.
  159.  *
  160.  *  GetXXXAccessControl calls will return access control masks for various categories of
  161.  *  users for this record. In addition they also return the level of access controls
  162.  *  that the user (who is making the GetXXXAccessControl call) has for the DNode,
  163.  *  record, or attribute type.
  164.  *
  165.  *  For records, the access control granted will be minimum of the DNode access
  166.  *  control and record access control masks.  For example, to add an attribute type to a
  167.  *  record, a user must have access control kCreateAttributeTypes at the record and
  168.  *  DNode levels.  Similarly, at the attribute type level, access controls will be the
  169.  *  minimum of the DNode, record, and attribute type access controls.
  170.  *
  171.  *  
  172.  */
  173. /* access privileges bit numbers */
  174. enum {
  175.     kSeeBit                        = 0,
  176.     kAddBit                        = 1,
  177.     kDeleteBit                    = 2,
  178.     kChangeBit                    = 3,
  179.     kRenameBit                    = 4,
  180.     kChangePrivsBit                = 5,
  181.     kSeeFoldersBit                = 6
  182. };
  183.  
  184. /* Values of AccessMask */
  185. enum {
  186.     kSeeMask                    = (1L << kSeeBit),
  187.     kAddMask                    = (1L << kAddBit),
  188.     kDeleteMask                    = (1L << kDeleteBit),
  189.     kChangeMask                    = (1L << kChangeBit),
  190.     kRenameMask                    = (1L << kRenameBit),
  191.     kChangePrivsMask            = (1L << kChangePrivsBit),
  192.     kSeeFoldersMask                = (1L << kSeeFoldersBit)
  193. };
  194.  
  195. enum {
  196.     kAllPrivs                    = (kSeeMask + kAddMask + kDeleteMask + kChangeMask + kRenameMask + kChangePrivsMask + kSeeFoldersMask),
  197.     kNoPrivs                    = 0
  198. };
  199.  
  200. /*
  201.  
  202. kSupportsDNodeNumberBit:
  203. If this bit is set, a DNode can be referenced using DNodeNumbers. 
  204. RecordLocationInfo can be specified using DNodeNumber and PathName component can be nil. 
  205. If this bit is not set, a DNode can be referenced only by PathName to the DNode. In the 
  206. later case DNodeNumber component inside record location info must be set to zero.
  207.  
  208. kSupportsRecordCreationIDBit:
  209. If this bit is set, a record can be referenced by specifying CreationID 
  210. in most catalog manager calls. If this bit is not set recordName and recordType are 
  211. required in the recordID specification for all catalog manager calls.
  212.  
  213. kSupportsAttributeCreationIDBit:
  214. If this bit is set, an attribute value can be obtained by specifying it's 
  215. CreationID in Lookup call staring point and also can be used in operations 
  216. like DeleteAttributeValue and ChangeAttributeValue an Attribute can be 
  217. specified by AttributeType and CreationID.
  218.  
  219. *************************************************************************
  220. Implicit assumption with creationID's and dNodeNumbers are, when supported
  221. they are persistent and will preserved across boots and life of the system.
  222. *************************************************************************
  223.  
  224. Following three bits are for determining the sort order in enumeration.
  225. kSupportsMatchAllBit:
  226. If this bit is set, enumeration of all the records is supported
  227.  
  228. kSupportsBeginsWithBit:
  229. If this bit is set, enumeration of records matching prefix (e.g. Begin with abc)
  230. is supported
  231.  
  232. kSupportsExactMatchBit:
  233. If this bit is set, existence of a record matching exact matchNameString and recordType
  234. is supported.
  235.  
  236. kSupportsEndsWithBit:
  237. If this bit is set, enumeration of records matching suffix (e.g. end with abc)
  238. is supported.
  239.  
  240. kSupportsContainsBit:
  241. If this bit is set, enumeration of records containing a matchNameString (e.g. containing abc)
  242. is supported
  243.  
  244.  
  245. Implicit assumption in all these is, a record type can be specified either as one of the above or
  246. a type list(more then one) to match exact type.
  247. The Following four bits will indicate sort ordering in enumeration.
  248.  
  249. kSupportsOrderedEnumerationBit:
  250. If this bit is set, Enumerated records or in some order possibly in name order.
  251.  
  252. kCanSupportNameOrderBit:
  253. If this is set, catalog will support sortbyName option in Enumerate.
  254.  
  255. kCanSupportTypeOrderBit:
  256. If this bit is set, catalog will support sortbyType option in enumearte.
  257.  
  258. kSupportSortBackwardsBit:
  259. If this bit is set, catalog supports backward sorting.
  260.  
  261. kSupportIndexRatioBit:
  262. If this bit is set, it indicates that enumeration will return approximate position
  263. of a record (percentile) among all records.
  264.  
  265. kSupportsEnumerationContinueBit:
  266. If this bit is set, catalog supports enumeration continue.
  267.  
  268. kSupportsLookupContinueBit:
  269. If this bit is set, catalog supports lookup continue.
  270.  
  271. kSupportsEnumerateAttributeTypeContinueBit:
  272. If this bit is set, catalog supports EnumerateAttributeType continue.
  273.  
  274. kSupportsEnumeratePseudonymContinueBit:
  275. If this bit is set, catalog supports EnumeratePseudonym continue.
  276.  
  277. kSupportsAliasesBit:
  278. If this bit is set, catalog supports create/delte/enumerate 
  279. of Alias Records.
  280.  
  281. kSupportPseudonymBit: 
  282. If this bit is set, catalog supports create/delte/enumerate of 
  283. pseudonyms for a record.
  284.  
  285. kSupportsPartialPathNameBit:
  286. If this bit is set, catalog nodes can be specified using DNodeNumber of a 
  287. intermediate DNode and a partial name starting from that DNode to the intended 
  288. DNode.
  289.  
  290. kSupportsAuthenticationBit:
  291. If this bit is set, catalog supports authentication manager calls.
  292.  
  293. kSupportsProxiesBit:
  294. If this bit is set, catalog supports proxy related calls in authentication manager. 
  295.  
  296. kSupportsFindRecordBit:
  297. If this bit is set, catalog supports find record call.
  298.  
  299. Bits and corresponding masks are as defined below.
  300. */
  301. enum {
  302.     kSupportsDNodeNumberBit        = 0,
  303.     kSupportsRecordCreationIDBit = 1,
  304.     kSupportsAttributeCreationIDBit = 2,
  305.     kSupportsMatchAllBit        = 3,
  306.     kSupportsBeginsWithBit        = 4,
  307.     kSupportsExactMatchBit        = 5,
  308.     kSupportsEndsWithBit        = 6,
  309.     kSupportsContainsBit        = 7,
  310.     kSupportsOrderedEnumerationBit = 8,
  311.     kCanSupportNameOrderBit        = 9,
  312.     kCanSupportTypeOrderBit        = 10,
  313.     kSupportSortBackwardsBit    = 11,
  314.     kSupportIndexRatioBit        = 12,
  315.     kSupportsEnumerationContinueBit = 13,
  316.     kSupportsLookupContinueBit    = 14,
  317.     kSupportsEnumerateAttributeTypeContinueBit = 15,
  318.     kSupportsEnumeratePseudonymContinueBit = 16,
  319.     kSupportsAliasesBit            = 17,
  320.     kSupportsPseudonymsBit        = 18,
  321.     kSupportsPartialPathNamesBit = 19,
  322.     kSupportsAuthenticationBit    = 20,
  323.     kSupportsProxiesBit            = 21,
  324.     kSupportsFindRecordBit        = 22
  325. };
  326.  
  327. /* values of DirGestalt */
  328. enum {
  329.     kSupportsDNodeNumberMask    = 1L << kSupportsDNodeNumberBit,
  330.     kSupportsRecordCreationIDMask = 1L << kSupportsRecordCreationIDBit,
  331.     kSupportsAttributeCreationIDMask = 1L << kSupportsAttributeCreationIDBit,
  332.     kSupportsMatchAllMask        = 1L << kSupportsMatchAllBit,
  333.     kSupportsBeginsWithMask        = 1L << kSupportsBeginsWithBit,
  334.     kSupportsExactMatchMask        = 1L << kSupportsExactMatchBit,
  335.     kSupportsEndsWithMask        = 1L << kSupportsEndsWithBit,
  336.     kSupportsContainsMask        = 1L << kSupportsContainsBit,
  337.     kSupportsOrderedEnumerationMask = 1L << kSupportsOrderedEnumerationBit,
  338.     kCanSupportNameOrderMask    = 1L << kCanSupportNameOrderBit,
  339.     kCanSupportTypeOrderMask    = 1L << kCanSupportTypeOrderBit,
  340.     kSupportSortBackwardsMask    = 1L << kSupportSortBackwardsBit,
  341.     kSupportIndexRatioMask        = 1L << kSupportIndexRatioBit,
  342.     kSupportsEnumerationContinueMask = 1L << kSupportsEnumerationContinueBit,
  343.     kSupportsLookupContinueMask    = 1L << kSupportsLookupContinueBit,
  344.     kSupportsEnumerateAttributeTypeContinueMask = 1L << kSupportsEnumerateAttributeTypeContinueBit,
  345.     kSupportsEnumeratePseudonymContinueMask = 1L << kSupportsEnumeratePseudonymContinueBit,
  346.     kSupportsAliasesMask        = 1L << kSupportsAliasesBit,
  347.     kSupportsPseudonymsMask        = 1L << kSupportsPseudonymsBit,
  348.     kSupportsPartialPathNamesMask = 1L << kSupportsPartialPathNamesBit,
  349.     kSupportsAuthenticationMask    = 1L << kSupportsAuthenticationBit,
  350.     kSupportsProxiesMask        = 1L << kSupportsProxiesBit,
  351.     kSupportsFindRecordMask        = 1L << kSupportsFindRecordBit
  352. };
  353.  
  354. /* Values of AuthLocalIdentityOp */
  355. enum {
  356.     kAuthLockLocalIdentityOp    = 1,
  357.     kAuthUnlockLocalIdentityOp    = 2,
  358.     kAuthLocalIdentityNameChangeOp = 3
  359. };
  360.  
  361. /* Values of AuthLocalIdentityLockAction */
  362. enum {
  363.     kAuthLockPending            = 1,
  364.     kAuthLockWillBeDone            = 2
  365. };
  366.  
  367. /* Values of AuthNotifications */
  368. enum {
  369.     kNotifyLockBit,
  370.     kNotifyUnlockBit,
  371.     kNotifyNameChangeBit
  372. };
  373.  
  374. enum {
  375.     kNotifyLockMask                = 1L << kNotifyLockBit,
  376.     kNotifyUnlockMask            = 1L << kNotifyUnlockBit,
  377.     kNotifyNameChangeMask        = 1L << kNotifyNameChangeBit
  378. };
  379.  
  380. enum {
  381.     kPersonalDirectoryFileCreator = 'kl03',
  382.     kPersonalDirectoryFileType    = 'pabt',
  383.     kBusinessCardFileType        = 'bust',
  384.     kDirectoryFileType            = 'dirt',
  385.     kDNodeFileType                = 'dnod',
  386.     kDirsRootFileType            = 'drtt',
  387.     kRecordFileType                = 'rcrd'
  388. };
  389.  
  390. typedef unsigned short DirSortOption;
  391.  
  392. typedef unsigned short DirSortDirection;
  393.  
  394. typedef unsigned long AccessMask;
  395.  
  396. typedef unsigned long DirGestalt;
  397.  
  398. typedef unsigned long AuthLocalIdentityOp;
  399.  
  400. typedef unsigned long AuthLocalIdentityLockAction;
  401.  
  402. typedef unsigned long AuthNotifications;
  403.  
  404. struct DNodeID {
  405.     DNodeNum                        dNodeNumber;                /* dNodenumber  */
  406.     long                            reserved1;
  407.     RStringPtr                        name;
  408.     long                            reserved2;
  409. };
  410. typedef struct DNodeID DNodeID;
  411.  
  412. struct DirEnumSpec {
  413.     DirEnumChoices                    enumFlag;
  414.     unsigned short                    indexRatio;                    /* Approx Record Position between 1 and 100 If supported, 0 If not supported */
  415.     union {
  416.         LocalRecordID                    recordIdentifier;
  417.         DNodeID                            dNodeIdentifier;
  418.     } u;
  419. };
  420.  
  421. typedef struct DirEnumSpec DirEnumSpec;
  422.  
  423. struct DirMetaInfo {
  424.     unsigned long                    info[4];
  425. };
  426. typedef struct DirMetaInfo DirMetaInfo;
  427.  
  428. struct SLRV {
  429.     ScriptCode                        script;                        /*   Script code in which entries are sorted */
  430.     short                            language;                    /*   Language code in which entries are sorted */
  431.     short                            regionCode;                    /*   Region code in which entries are sorted */
  432.     short                            version;                    /*  version of oce sorting software */
  433. };
  434. typedef struct SLRV SLRV;
  435.  
  436. /* Catalog types and operations */
  437. /* unique identifier for an identity */
  438. typedef unsigned long AuthIdentity;
  439.  
  440. /* Umbrella LocalIdentity */
  441. typedef AuthIdentity LocalIdentity;
  442.  
  443. /* A DES key is 8 bytes of data */
  444. struct DESKey {
  445.     unsigned long                    a;
  446.     unsigned long                    b;
  447. };
  448. typedef struct DESKey DESKey;
  449.  
  450. typedef Byte RC4Key[kRC4KeySizeInBytes];
  451.  
  452. typedef unsigned long AuthKeyType;
  453.  
  454. /* key type followed by its data */
  455. struct AuthKey {
  456.     AuthKeyType                        keyType;
  457.     union {
  458.         DESKey                            des;
  459.         RC4Key                            rc4;
  460.     } u;
  461. };
  462.  
  463. typedef struct AuthKey AuthKey;
  464.  
  465. typedef AuthKey *AuthKeyPtr;
  466.  
  467. typedef union AuthParamBlock AuthParamBlock;
  468.  
  469. typedef AuthParamBlock *AuthParamBlockPtr;
  470.  
  471. typedef pascal void (*AuthIOCompletionProcPtr)(AuthParamBlockPtr paramBlock);
  472.  
  473. #if GENERATINGCFM
  474. typedef UniversalProcPtr AuthIOCompletionUPP;
  475. #else
  476. typedef AuthIOCompletionProcPtr AuthIOCompletionUPP;
  477. #endif
  478.  
  479. /*
  480. This header is common to all the parameter blocks.  Clients should not directly
  481. touch any of these fields except ioCompletion.  ioCompletion is the
  482. completion routine pointer for async calls; it is ignored for sync calls.
  483. ioResult is the result code from the call.
  484. */
  485. #define AuthParamHeader         \
  486.     Ptr    qLink;                        \
  487.     long    reserved1;                \
  488.     long    reserved2;                \
  489.     AuthIOCompletionUPP    ioCompletion;     \
  490.     OSErr    ioResult;                \
  491.     unsigned long    saveA5;            \
  492.     short    reqCode;                    \
  493.     long    reserved[2];                \
  494.     AddrBlock    serverHint;            \
  495.     short    dsRefNum;                \
  496.     unsigned long    callID;            \
  497.     AuthIdentity    identity;            \
  498.     long    gReserved1;                \
  499.     long    gReserved2;                \
  500.     long    gReserved3;                \
  501.     long    clientData;
  502. /*****************************************************************************
  503.  
  504.  
  505.         Authentication Manager operations 
  506.  
  507. *****************************************************************************/
  508. /*
  509. kAuthResolveCreationID:
  510. userRecord will contain the user information whose creationID has to be
  511. returned. A client must make this call when he does not know the creaitionID.
  512. The creationID must be set to nil before making the call. The server will attempt
  513. to match the recordid's in the data base which match the user name and
  514. type in the record.  Depending on number of matchings, following
  515. results will be returned.
  516. Exactly One Match : CreationID in RecordID and also in buffer (if buffer is given)
  517. totalMatches = actualMatches = 1.
  518. > 1 Match:
  519.     Buffer is Large Enough:
  520.     totalMatches = actualMatches
  521.     Buffer will contain all the CIDs, kOCEAmbiguousMatches error.
  522. > 1 Match:
  523.     Buffer is not Large Enough:
  524.     totalMatches > actualMatches
  525.     Buffer will contain all the CIDs (equal to actualMatches), daMoreDataError error.
  526. 0 Matches:
  527.  kOCENoSuchRecord error
  528. */
  529. struct AuthResolveCreationIDPB {
  530.     Ptr                                qLink;
  531.     long                            reserved1;
  532.     long                            reserved2;
  533.     AuthIOCompletionUPP                ioCompletion;
  534.     OSErr                            ioResult;
  535.     unsigned long                    saveA5;
  536.     short                            reqCode;
  537.     long                            reserved[2];
  538.     AddrBlock                        serverHint;
  539.     short                            dsRefNum;
  540.     unsigned long                    callID;
  541.     AuthIdentity                    identity;
  542.     long                            gReserved1;
  543.     long                            gReserved2;
  544.     long                            gReserved3;
  545.     long                            clientData;
  546.     RecordIDPtr                        userRecord;                    /*  --> OCE name(Record) of the user */
  547.     unsigned long                    bufferLength;                /*  --> Buffer Size to hold duplicate Info */
  548.     Ptr                                buffer;                        /*  --> Buffer  to hold duplicate Info */
  549.     unsigned long                    totalMatches;                /* <--  Total Number of matching names found */
  550.     unsigned long                    actualMatches;                /* <--  Number of matches returned in the buffer */
  551. };
  552. typedef struct AuthResolveCreationIDPB AuthResolveCreationIDPB;
  553.  
  554. /*
  555. kAuthBindSpecificIdentity:
  556. userRecord will contain the user information whose identity has to be
  557. verified. userKey will contain the userKey. An Identity is returned which
  558. binds the key and the userRecord. The identity returned can be used in the 'identity'
  559. field in the header portion (AuthParamHeader) for authenticating the Catalog and
  560. Authentication manager calls.
  561. */
  562. struct AuthBindSpecificIdentityPB {
  563.     Ptr                                qLink;
  564.     long                            reserved1;
  565.     long                            reserved2;
  566.     AuthIOCompletionUPP                ioCompletion;
  567.     OSErr                            ioResult;
  568.     unsigned long                    saveA5;
  569.     short                            reqCode;
  570.     long                            reserved[2];
  571.     AddrBlock                        serverHint;
  572.     short                            dsRefNum;
  573.     unsigned long                    callID;
  574.     AuthIdentity                    identity;
  575.     long                            gReserved1;
  576.     long                            gReserved2;
  577.     long                            gReserved3;
  578.     long                            clientData;
  579.     AuthIdentity                    userIdentity;                /* <--  binding identity */
  580.     RecordIDPtr                        userRecord;                    /*  --> OCE name(Record) of the user */
  581.     AuthKeyPtr                        userKey;                    /*  --> OCE Key for the user */
  582. };
  583. typedef struct AuthBindSpecificIdentityPB AuthBindSpecificIdentityPB;
  584.  
  585. /*
  586. kAuthUnbindSpecificIdentity:
  587. This call will unbind the userRecord and key which were bind earlier.
  588. */
  589. struct AuthUnbindSpecificIdentityPB {
  590.     Ptr                                qLink;
  591.     long                            reserved1;
  592.     long                            reserved2;
  593.     AuthIOCompletionUPP                ioCompletion;
  594.     OSErr                            ioResult;
  595.     unsigned long                    saveA5;
  596.     short                            reqCode;
  597.     long                            reserved[2];
  598.     AddrBlock                        serverHint;
  599.     short                            dsRefNum;
  600.     unsigned long                    callID;
  601.     AuthIdentity                    identity;
  602.     long                            gReserved1;
  603.     long                            gReserved2;
  604.     long                            gReserved3;
  605.     long                            clientData;
  606.     AuthIdentity                    userIdentity;                /*  --> identity to be deleted */
  607. };
  608. typedef struct AuthUnbindSpecificIdentityPB AuthUnbindSpecificIdentityPB;
  609.  
  610. /*
  611. kAuthGetSpecificIdentityInfo:
  612. This call will return the userRecord for the given identity. Note: key is not
  613. returned because this would compromise security.
  614. */
  615. struct AuthGetSpecificIdentityInfoPB {
  616.     Ptr                                qLink;
  617.     long                            reserved1;
  618.     long                            reserved2;
  619.     AuthIOCompletionUPP                ioCompletion;
  620.     OSErr                            ioResult;
  621.     unsigned long                    saveA5;
  622.     short                            reqCode;
  623.     long                            reserved[2];
  624.     AddrBlock                        serverHint;
  625.     short                            dsRefNum;
  626.     unsigned long                    callID;
  627.     AuthIdentity                    identity;
  628.     long                            gReserved1;
  629.     long                            gReserved2;
  630.     long                            gReserved3;
  631.     long                            clientData;
  632.     AuthIdentity                    userIdentity;                /*  --> identity of initiator */
  633.     RecordIDPtr                        userRecord;                    /* <--  OCE name(Record) of the user */
  634. };
  635. typedef struct AuthGetSpecificIdentityInfoPB AuthGetSpecificIdentityInfoPB;
  636.  
  637. /*
  638. kAuthAddKey:
  639. userRecord will contain the user information whose identity has to be
  640. created. userKey will point to the key to be created. password points to
  641. an RString containing the password used to generate the key.
  642. */
  643. struct AuthAddKeyPB {
  644.     Ptr                                qLink;
  645.     long                            reserved1;
  646.     long                            reserved2;
  647.     AuthIOCompletionUPP                ioCompletion;
  648.     OSErr                            ioResult;
  649.     unsigned long                    saveA5;
  650.     short                            reqCode;
  651.     long                            reserved[2];
  652.     AddrBlock                        serverHint;
  653.     short                            dsRefNum;
  654.     unsigned long                    callID;
  655.     AuthIdentity                    identity;
  656.     long                            gReserved1;
  657.     long                            gReserved2;
  658.     long                            gReserved3;
  659.     long                            clientData;
  660.     RecordIDPtr                        userRecord;                    /*  --> OCE name(Record) of the user */
  661.     AuthKeyPtr                        userKey;                    /* <--  OCE Key for the user */
  662.     RStringPtr                        password;                    /*  --> Pointer to password string */
  663. };
  664. typedef struct AuthAddKeyPB AuthAddKeyPB;
  665.  
  666. /*
  667. kAuthChangeKey:
  668. userRecord will contain the user information whose identity has to be
  669. created. userKey will point to the key to be created. password points to
  670. an RString containing the password used to generate the key.
  671. */
  672. struct AuthChangeKeyPB {
  673.     Ptr                                qLink;
  674.     long                            reserved1;
  675.     long                            reserved2;
  676.     AuthIOCompletionUPP                ioCompletion;
  677.     OSErr                            ioResult;
  678.     unsigned long                    saveA5;
  679.     short                            reqCode;
  680.     long                            reserved[2];
  681.     AddrBlock                        serverHint;
  682.     short                            dsRefNum;
  683.     unsigned long                    callID;
  684.     AuthIdentity                    identity;
  685.     long                            gReserved1;
  686.     long                            gReserved2;
  687.     long                            gReserved3;
  688.     long                            clientData;
  689.     RecordIDPtr                        userRecord;                    /*  --> OCE name(Record) of the user */
  690.     AuthKeyPtr                        userKey;                    /* <--  New OCE Key for the user */
  691.     RStringPtr                        password;                    /*  -->Pointer to the new password string */
  692. };
  693. typedef struct AuthChangeKeyPB AuthChangeKeyPB;
  694.  
  695. /*
  696. AuthDeleteKey:
  697. userRecord will contain the user information whose Key has to be deleted.
  698. */
  699. struct AuthDeleteKeyPB {
  700.     Ptr                                qLink;
  701.     long                            reserved1;
  702.     long                            reserved2;
  703.     AuthIOCompletionUPP                ioCompletion;
  704.     OSErr                            ioResult;
  705.     unsigned long                    saveA5;
  706.     short                            reqCode;
  707.     long                            reserved[2];
  708.     AddrBlock                        serverHint;
  709.     short                            dsRefNum;
  710.     unsigned long                    callID;
  711.     AuthIdentity                    identity;
  712.     long                            gReserved1;
  713.     long                            gReserved2;
  714.     long                            gReserved3;
  715.     long                            clientData;
  716.     RecordIDPtr                        userRecord;                    /*  --> OCE name(Record) of the user */
  717. };
  718. typedef struct AuthDeleteKeyPB AuthDeleteKeyPB;
  719.  
  720. /* AuthPasswordToKey: Converts an RString into a key. */
  721. struct AuthPasswordToKeyPB {
  722.     Ptr                                qLink;
  723.     long                            reserved1;
  724.     long                            reserved2;
  725.     AuthIOCompletionUPP                ioCompletion;
  726.     OSErr                            ioResult;
  727.     unsigned long                    saveA5;
  728.     short                            reqCode;
  729.     long                            reserved[2];
  730.     AddrBlock                        serverHint;
  731.     short                            dsRefNum;
  732.     unsigned long                    callID;
  733.     AuthIdentity                    identity;
  734.     long                            gReserved1;
  735.     long                            gReserved2;
  736.     long                            gReserved3;
  737.     long                            clientData;
  738.     RecordIDPtr                        userRecord;                    /*  --> OCE name(Record) of the user */
  739.     AuthKeyPtr                        key;                        /* <--  */
  740.     RStringPtr                        password;                    /*  -->Pointer to the new password string */
  741. };
  742. typedef struct AuthPasswordToKeyPB AuthPasswordToKeyPB;
  743.  
  744. /*
  745. kAuthGetCredentials:
  746. userRecord will contain the user information whose identity has to be
  747. kMailDeletedMask. keyType (e.g. asDESKey) will indicate what type of key has to
  748. be deleted.
  749. */
  750. struct AuthGetCredentialsPB {
  751.     Ptr                                qLink;
  752.     long                            reserved1;
  753.     long                            reserved2;
  754.     AuthIOCompletionUPP                ioCompletion;
  755.     OSErr                            ioResult;
  756.     unsigned long                    saveA5;
  757.     short                            reqCode;
  758.     long                            reserved[2];
  759.     AddrBlock                        serverHint;
  760.     short                            dsRefNum;
  761.     unsigned long                    callID;
  762.     AuthIdentity                    identity;
  763.     long                            gReserved1;
  764.     long                            gReserved2;
  765.     long                            gReserved3;
  766.     long                            clientData;
  767.     AuthIdentity                    userIdentity;                /*  --> identity of initiator */
  768.     RecordIDPtr                        recipient;                    /*  --> OCE name of recipient */
  769.     AuthKeyPtr                        sessionKey;                    /* <--  session key */
  770.     UTCTime                            expiry;                        /* <--> desired/actual expiry */
  771.     unsigned long                    credentialsLength;            /* <--> max/actual credentials size */
  772.     Ptr                                credentials;                /* <--  buffer where credentials are returned */
  773. };
  774. typedef struct AuthGetCredentialsPB AuthGetCredentialsPB;
  775.  
  776. /*
  777. AuthDecryptCredentialsPB:
  778. Changes:
  779. userKey is changed userIdentity.
  780. userRecord is changed to initiatorRecord. User must supply buffer
  781. to hold initiatorRecord.
  782. agentList has changed to agent. There wil be no call back.
  783. User must supply buffer to hold agent Record.
  784. An additional boolean parameter 'hasAgent' is included.
  785. Toolbox will set this if an 'Agent' record is found in the
  786. credentials. If RecordIDPtr is 'nil', no agent record will
  787. be copied. However user can examine 'hasAgent', If true user
  788. can reissue this call with apprpriate buffer for getting a recordID.
  789. agent has changed to intermediary.  User must supply buffer to hold 
  790. intermediary Record.  The toolbox will set 'hasIntermediary' if an
  791. 'intermediary' record is found in the credentials. 
  792. */
  793. struct AuthDecryptCredentialsPB {
  794.     Ptr                                qLink;
  795.     long                            reserved1;
  796.     long                            reserved2;
  797.     AuthIOCompletionUPP                ioCompletion;
  798.     OSErr                            ioResult;
  799.     unsigned long                    saveA5;
  800.     short                            reqCode;
  801.     long                            reserved[2];
  802.     AddrBlock                        serverHint;
  803.     short                            dsRefNum;
  804.     unsigned long                    callID;
  805.     AuthIdentity                    identity;
  806.     long                            gReserved1;
  807.     long                            gReserved2;
  808.     long                            gReserved3;
  809.     long                            clientData;
  810.     AuthIdentity                    userIdentity;                /*  --> user's Identity */
  811.     RecordIDPtr                        initiatorRecord;            /* <--  OCE name of the initiator */
  812.     AuthKeyPtr                        sessionKey;                    /* <--  session key */
  813.     UTCTime                            expiry;                        /* <--  credentials expiry time */
  814.     unsigned long                    credentialsLength;            /*  --> actual credentials size */
  815.     Ptr                                credentials;                /*  --> credentials to be decrypted */
  816.     UTCTime                            issueTime;                    /* <--  credentials expiry time */
  817.     Boolean                            hasIntermediary;            /* <--  if true, An intermediary Record was found in credentials */
  818.     Boolean                            filler1;
  819.     RecordIDPtr                        intermediary;                /* <--  recordID of the intermediary */
  820. };
  821. typedef struct AuthDecryptCredentialsPB AuthDecryptCredentialsPB;
  822.  
  823. struct AuthMakeChallengePB {
  824.     Ptr                                qLink;
  825.     long                            reserved1;
  826.     long                            reserved2;
  827.     AuthIOCompletionUPP                ioCompletion;
  828.     OSErr                            ioResult;
  829.     unsigned long                    saveA5;
  830.     short                            reqCode;
  831.     long                            reserved[2];
  832.     AddrBlock                        serverHint;
  833.     short                            dsRefNum;
  834.     unsigned long                    callID;
  835.     AuthIdentity                    identity;
  836.     long                            gReserved1;
  837.     long                            gReserved2;
  838.     long                            gReserved3;
  839.     long                            clientData;
  840.     AuthKeyPtr                        key;                        /*  --> UnEncrypted SessionKey */
  841.     Ptr                                challenge;                    /* <--  Encrypted Challenge */
  842.     unsigned long                    challengeBufferLength;        /*  ->length of challenge buffer */
  843.     unsigned long                    challengeLength;            /*  <-length of Encrypted Challenge */
  844. };
  845. typedef struct AuthMakeChallengePB AuthMakeChallengePB;
  846.  
  847. struct AuthMakeReplyPB {
  848.     Ptr                                qLink;
  849.     long                            reserved1;
  850.     long                            reserved2;
  851.     AuthIOCompletionUPP                ioCompletion;
  852.     OSErr                            ioResult;
  853.     unsigned long                    saveA5;
  854.     short                            reqCode;
  855.     long                            reserved[2];
  856.     AddrBlock                        serverHint;
  857.     short                            dsRefNum;
  858.     unsigned long                    callID;
  859.     AuthIdentity                    identity;
  860.     long                            gReserved1;
  861.     long                            gReserved2;
  862.     long                            gReserved3;
  863.     long                            clientData;
  864.     AuthKeyPtr                        key;                        /*  --> UnEncrypted SessionKey */
  865.     Ptr                                challenge;                    /*  --> Encrypted Challenge */
  866.     Ptr                                reply;                        /* <--  Encrypted Reply */
  867.     unsigned long                    replyBufferLength;            /*  -->length of challenge buffer */
  868.     unsigned long                    challengeLength;            /*  --> length of Encrypted Challenge */
  869.     unsigned long                    replyLength;                /* <--  length of Encrypted Reply */
  870. };
  871. typedef struct AuthMakeReplyPB AuthMakeReplyPB;
  872.  
  873. struct AuthVerifyReplyPB {
  874.     Ptr                                qLink;
  875.     long                            reserved1;
  876.     long                            reserved2;
  877.     AuthIOCompletionUPP                ioCompletion;
  878.     OSErr                            ioResult;
  879.     unsigned long                    saveA5;
  880.     short                            reqCode;
  881.     long                            reserved[2];
  882.     AddrBlock                        serverHint;
  883.     short                            dsRefNum;
  884.     unsigned long                    callID;
  885.     AuthIdentity                    identity;
  886.     long                            gReserved1;
  887.     long                            gReserved2;
  888.     long                            gReserved3;
  889.     long                            clientData;
  890.     AuthKeyPtr                        key;                        /*  --> UnEncrypted SessionKey */
  891.     Ptr                                challenge;                    /*  --> Encrypted Challenge */
  892.     Ptr                                reply;                        /*  --> Encrypted Reply */
  893.     unsigned long                    challengeLength;            /*  --> length of Encrypted Challenge */
  894.     unsigned long                    replyLength;                /*  --> length of Encrypted Reply */
  895. };
  896. typedef struct AuthVerifyReplyPB AuthVerifyReplyPB;
  897.  
  898. /*
  899. kAuthGetUTCTime:
  900. RLI will contain a valid RLI for a cluster server.
  901. UTC(GMT) time from one of the cluster server will be returned.
  902. An 'offSet' from UTC(GMT) to Mac Local Time will also be returned.
  903. If RLI is nil Map DA is used to determine UTC(GMT).
  904. Mac Local Time = theUTCTime + theUTCOffset.
  905. */
  906. struct AuthGetUTCTimePB {
  907.     Ptr                                qLink;
  908.     long                            reserved1;
  909.     long                            reserved2;
  910.     AuthIOCompletionUPP                ioCompletion;
  911.     OSErr                            ioResult;
  912.     unsigned long                    saveA5;
  913.     short                            reqCode;
  914.     long                            reserved[2];
  915.     AddrBlock                        serverHint;
  916.     short                            dsRefNum;
  917.     unsigned long                    callID;
  918.     AuthIdentity                    identity;
  919.     long                            gReserved1;
  920.     long                            gReserved2;
  921.     long                            gReserved3;
  922.     long                            clientData;
  923.     PackedRLIPtr                    pRLI;                        /*  --> packed RLI of the Node, whose server's UTC is requested */
  924.     UTCTime                            theUTCTime;                    /* <--  current UTC(GMT) Time utc seconds since 1/1/1904 */
  925.     UTCOffset                        theUTCOffset;                /* <--  offset from UTC(GMT) seconds EAST of Greenwich */
  926. };
  927. typedef struct AuthGetUTCTimePB AuthGetUTCTimePB;
  928.  
  929. /*
  930. kAuthMakeProxy:
  931. A user represented bu the 'userIdentity' can make a proxy using this call.
  932. 'recipient' is the RecordID of the recipient whom user is requesting proxy.
  933. 'intermediary' is the RecordID of the intermediary holding proxy for the user.
  934. 'firstValid' is time at which proxy becomes valid.
  935. 'expiry' is the time at which proxy must expire.
  936. 'proxyLength' will have the length of the buffer pointed by 'proxy' as input.
  937. When the call completes, it will hold the actual length of proxy. If the
  938. call completes 'kOCEMoreData' error, client can reissue the call with the
  939. buffer size as 'proxyLength' returned.
  940. expiry is a suggestion, and may be adjusted to be earlier by the ADAP/OCE server.
  941. The 'proxy' obtained like this might be used by the 'intermediary' to obtain credentials
  942. for the server using TradeProxyForCredentials call.
  943. authDataLength and authData are intended for possible future work, but are
  944. ignored for now.
  945. */
  946. struct AuthMakeProxyPB {
  947.     Ptr                                qLink;
  948.     long                            reserved1;
  949.     long                            reserved2;
  950.     AuthIOCompletionUPP                ioCompletion;
  951.     OSErr                            ioResult;
  952.     unsigned long                    saveA5;
  953.     short                            reqCode;
  954.     long                            reserved[2];
  955.     AddrBlock                        serverHint;
  956.     short                            dsRefNum;
  957.     unsigned long                    callID;
  958.     AuthIdentity                    identity;
  959.     long                            gReserved1;
  960.     long                            gReserved2;
  961.     long                            gReserved3;
  962.     long                            clientData;
  963.     AuthIdentity                    userIdentity;                /*  --> identity of principal */
  964.     RecordIDPtr                        recipient;                    /*  --> OCE name of recipient */
  965.     UTCTime                            firstValid;                    /*  --> time at which proxy becomes valid */
  966.     UTCTime                            expiry;                        /*  --> time at which proxy expires */
  967.     unsigned long                    authDataLength;                /*  --> size of authorization data */
  968.     Ptr                                authData;                    /*  --> pointer to authorization data */
  969.     unsigned long                    proxyLength;                /* <--> max/actual proxy size */
  970.     Ptr                                proxy;                        /* <--> buffer where proxy is returned */
  971.     RecordIDPtr                        intermediary;                /*  --> RecordID of intermediary */
  972. };
  973. typedef struct AuthMakeProxyPB AuthMakeProxyPB;
  974.  
  975. /*
  976. kAuthTradeProxyForCredentials:
  977. Using this call, intermediary holding a 'proxy' for a recipient may obtain credentials
  978. for that recipient. 'userIdentity' is the identity for the 'intermediary'.
  979. 'recipient' is the RecordID for whom credetials are requested.
  980. 'principal' is the RecordID of the user who created the proxy.
  981. 'proxyLength' is the length of data pointed by 'proxy.
  982. If the call is succesfull, credentials will be returned in the
  983. buffer pointed by 'credentials'. 'expiry' is the desired expiry time at input.
  984. When call succeds this will have expiry time of credentials.
  985. This is very similar to GetCredentials except that we (of course) need the proxy,
  986. but we also need the name of the principal who created the proxy.
  987. */
  988. struct AuthTradeProxyForCredentialsPB {
  989.     Ptr                                qLink;
  990.     long                            reserved1;
  991.     long                            reserved2;
  992.     AuthIOCompletionUPP                ioCompletion;
  993.     OSErr                            ioResult;
  994.     unsigned long                    saveA5;
  995.     short                            reqCode;
  996.     long                            reserved[2];
  997.     AddrBlock                        serverHint;
  998.     short                            dsRefNum;
  999.     unsigned long                    callID;
  1000.     AuthIdentity                    identity;
  1001.     long                            gReserved1;
  1002.     long                            gReserved2;
  1003.     long                            gReserved3;
  1004.     long                            clientData;
  1005.     AuthIdentity                    userIdentity;                /*  --> identity of intermediary */
  1006.     RecordIDPtr                        recipient;                    /*  --> OCE name of recipient */
  1007.     AuthKeyPtr                        sessionKey;                    /* <--  session key */
  1008.     UTCTime                            expiry;                        /* <--> desired/actual expiry */
  1009.     unsigned long                    credentialsLength;            /* <--> max/actual credentials size */
  1010.     Ptr                                credentials;                /* <--> buffer where credentials are returned */
  1011.     unsigned long                    proxyLength;                /*  --> actual proxy size */
  1012.     Ptr                                proxy;                        /*  --> buffer containing proxy */
  1013.     RecordIDPtr                        principal;                    /*  --> RecordID of principal */
  1014. };
  1015. typedef struct AuthTradeProxyForCredentialsPB AuthTradeProxyForCredentialsPB;
  1016.  
  1017. /* API for Local Identity Interface */
  1018. /*
  1019. AuthGetLocalIdentityPB:
  1020. A Collaborative application intended to work under the umbrella of LocalIdentity
  1021. for the OCE toolbox will have to make this call to obtain LocalIdentity.
  1022. If LocalIdentity has not been setup, then application will get
  1023. 'kOCEOCESetupRequired.'. In this case application should put the dialog
  1024. recommended by the OCE Setup document and guide the user through OCE Setup.
  1025. If the OCESetup contains local identity, but user has not unlocked, it will get
  1026. kOCELocalAuthenticationFail. In this case application should use SDPPromptForLocalIdentity
  1027. to prompt user for the password.
  1028. If a backGround application or stand alone code requires LocalIdentity, if it gets the
  1029. OSErr from LocalIdentity and can not call SDPPromptForLocalIdentity, it should it self
  1030. register with the toolbox using kAuthAddToLocalIdentityQueue call. It will be notified
  1031. when a LocalIdentity gets created by a foreground application.
  1032. */
  1033. struct AuthGetLocalIdentityPB {
  1034.     Ptr                                qLink;
  1035.     long                            reserved1;
  1036.     long                            reserved2;
  1037.     AuthIOCompletionUPP                ioCompletion;
  1038.     OSErr                            ioResult;
  1039.     unsigned long                    saveA5;
  1040.     short                            reqCode;
  1041.     long                            reserved[2];
  1042.     AddrBlock                        serverHint;
  1043.     short                            dsRefNum;
  1044.     unsigned long                    callID;
  1045.     AuthIdentity                    identity;
  1046.     long                            gReserved1;
  1047.     long                            gReserved2;
  1048.     long                            gReserved3;
  1049.     long                            clientData;
  1050.     LocalIdentity                    theLocalIdentity;            /* <--  LocalIdentity */
  1051. };
  1052. typedef struct AuthGetLocalIdentityPB AuthGetLocalIdentityPB;
  1053.  
  1054. /*
  1055. kAuthUnlockLocalIdentity:
  1056. The LocalIdentity can be created using this call.
  1057. The userName and password correspond to the LocalIdentity setup.
  1058. If the password matches, then collabIdentity will be returned.
  1059. Typically SDPPromptForLocalIdentity call will make this call.
  1060. All applications which are registered through kAuthAddToLocalIdentityQueue
  1061. will be notified.
  1062. */
  1063. struct AuthUnlockLocalIdentityPB {
  1064.     Ptr                                qLink;
  1065.     long                            reserved1;
  1066.     long                            reserved2;
  1067.     AuthIOCompletionUPP                ioCompletion;
  1068.     OSErr                            ioResult;
  1069.     unsigned long                    saveA5;
  1070.     short                            reqCode;
  1071.     long                            reserved[2];
  1072.     AddrBlock                        serverHint;
  1073.     short                            dsRefNum;
  1074.     unsigned long                    callID;
  1075.     AuthIdentity                    identity;
  1076.     long                            gReserved1;
  1077.     long                            gReserved2;
  1078.     long                            gReserved3;
  1079.     long                            clientData;
  1080.     LocalIdentity                    theLocalIdentity;            /* <--  LocalIdentity */
  1081.     RStringPtr                        userName;                    /*  --> userName */
  1082.     RStringPtr                        password;                    /*  -->user password */
  1083. };
  1084. typedef struct AuthUnlockLocalIdentityPB AuthUnlockLocalIdentityPB;
  1085.  
  1086. /*
  1087. kAuthLockLocalIdentity:
  1088. With this call existing LocalIdentity can be locked. If the ASDeleteLocalIdetity
  1089. call fails with 'kOCEOperationDenied' error, name will contain the application which
  1090. denied the operation. This name will be supplied by the application
  1091. when it registered through kAuthAddToLocalIdentityQueue call
  1092. */
  1093. struct AuthLockLocalIdentityPB {
  1094.     Ptr                                qLink;
  1095.     long                            reserved1;
  1096.     long                            reserved2;
  1097.     AuthIOCompletionUPP                ioCompletion;
  1098.     OSErr                            ioResult;
  1099.     unsigned long                    saveA5;
  1100.     short                            reqCode;
  1101.     long                            reserved[2];
  1102.     AddrBlock                        serverHint;
  1103.     short                            dsRefNum;
  1104.     unsigned long                    callID;
  1105.     AuthIdentity                    identity;
  1106.     long                            gReserved1;
  1107.     long                            gReserved2;
  1108.     long                            gReserved3;
  1109.     long                            clientData;
  1110.     LocalIdentity                    theLocalIdentity;            /*  --> LocalIdentity */
  1111.     StringPtr                        name;                        /* <--  name of the app which denied delete */
  1112. };
  1113. typedef struct AuthLockLocalIdentityPB AuthLockLocalIdentityPB;
  1114.  
  1115. typedef pascal Boolean (*NotificationProcPtr)(long clientData, AuthLocalIdentityOp callValue, AuthLocalIdentityLockAction actionValue, LocalIdentity identity);
  1116.  
  1117. #if GENERATINGCFM
  1118. typedef UniversalProcPtr NotificationUPP;
  1119. #else
  1120. typedef NotificationProcPtr NotificationUPP;
  1121. #endif
  1122.  
  1123. typedef NotificationUPP NotificationProc;
  1124.  
  1125. /*
  1126. kAuthAddToLocalIdentityQueue:
  1127. An application requiring notification of locking/unlocking of the
  1128. LocalIdentity can install itself using this call. The function provided
  1129. in 'notifyProc' will be called whenever the requested event happens.
  1130. When an AuthLockLocalIdentity call is made to the toolbox, the notificationProc
  1131. will be called with 'kAuthLockPending'. The application may refuse the lock by returning
  1132. a 'true' value. If all the registered entries return 'false' value, locking will be done
  1133. successfully. Otherwise 'kOCEOperationDenied' error is returned to the caller. The appName
  1134. (registered with the notificationProc) of the application which denied locking is also
  1135. returned to the caller making the AuthLockIdentity call.
  1136. */
  1137. struct AuthAddToLocalIdentityQueuePB {
  1138.     Ptr                                qLink;
  1139.     long                            reserved1;
  1140.     long                            reserved2;
  1141.     AuthIOCompletionUPP                ioCompletion;
  1142.     OSErr                            ioResult;
  1143.     unsigned long                    saveA5;
  1144.     short                            reqCode;
  1145.     long                            reserved[2];
  1146.     AddrBlock                        serverHint;
  1147.     short                            dsRefNum;
  1148.     unsigned long                    callID;
  1149.     AuthIdentity                    identity;
  1150.     long                            gReserved1;
  1151.     long                            gReserved2;
  1152.     long                            gReserved3;
  1153.     long                            clientData;
  1154.     NotificationUPP                    notifyProc;                    /*  --> notification procedure */
  1155.     AuthNotifications                notifyFlags;                /*  --> notifyFlags */
  1156.     StringPtr                        appName;                    /*  --> name of application to be returned in Delete/Stop */
  1157. };
  1158. typedef struct AuthAddToLocalIdentityQueuePB AuthAddToLocalIdentityQueuePB;
  1159.  
  1160. /*
  1161. kAuthRemoveFromLocalIdentityQueue:*/
  1162. struct AuthRemoveFromLocalIdentityQueuePB {
  1163.     Ptr                                qLink;
  1164.     long                            reserved1;
  1165.     long                            reserved2;
  1166.     AuthIOCompletionUPP                ioCompletion;
  1167.     OSErr                            ioResult;
  1168.     unsigned long                    saveA5;
  1169.     short                            reqCode;
  1170.     long                            reserved[2];
  1171.     AddrBlock                        serverHint;
  1172.     short                            dsRefNum;
  1173.     unsigned long                    callID;
  1174.     AuthIdentity                    identity;
  1175.     long                            gReserved1;
  1176.     long                            gReserved2;
  1177.     long                            gReserved3;
  1178.     long                            clientData;
  1179.     NotificationUPP                    notifyProc;                    /*  --> notification procedure */
  1180. };
  1181. typedef struct AuthRemoveFromLocalIdentityQueuePB AuthRemoveFromLocalIdentityQueuePB;
  1182.  
  1183. /*
  1184. kAuthSetupLocalIdentity:
  1185. The LocalIdentity can be Setup using this call.
  1186. The userName and password correspond to the LocalIdentity setup.
  1187. If a LocalIdentity Setup already exists 'kOCELocalIdentitySetupExists' error
  1188. will be returned.
  1189. */
  1190. struct AuthSetupLocalIdentityPB {
  1191.     Ptr                                qLink;
  1192.     long                            reserved1;
  1193.     long                            reserved2;
  1194.     AuthIOCompletionUPP                ioCompletion;
  1195.     OSErr                            ioResult;
  1196.     unsigned long                    saveA5;
  1197.     short                            reqCode;
  1198.     long                            reserved[2];
  1199.     AddrBlock                        serverHint;
  1200.     short                            dsRefNum;
  1201.     unsigned long                    callID;
  1202.     AuthIdentity                    identity;
  1203.     long                            gReserved1;
  1204.     long                            gReserved2;
  1205.     long                            gReserved3;
  1206.     long                            clientData;
  1207.     long                            aReserved;                    /*  --  */
  1208.     RStringPtr                        userName;                    /*  --> userName */
  1209.     RStringPtr                        password;                    /*  -->user password */
  1210. };
  1211. typedef struct AuthSetupLocalIdentityPB AuthSetupLocalIdentityPB;
  1212.  
  1213. /*
  1214. kAuthChangeLocalIdentity:
  1215. An existing LocalIdentity  Setup can be changed using this call.
  1216. The userName and password correspond to the LocalIdentity setup.
  1217. If a LocalIdentity Setup does not exists 'kOCEOCESetupRequired' error
  1218. will be returned. The user can use  kAuthSetupLocalIdentity call to setit up.
  1219. If the 'password' does not correspond to the existing setup, 'kOCELocalAuthenticationFail'
  1220. OSErr will be returned. If successful, LocalID will have new name as 'userName' and
  1221. password as 'newPassword' and if any applications has installed into 
  1222. LocalIdentityQueue with kNotifyNameChangeMask set, it will be notified with 
  1223. kAuthLocalIdentityNameChangeOp action value. 
  1224.  
  1225. */
  1226. struct AuthChangeLocalIdentityPB {
  1227.     Ptr                                qLink;
  1228.     long                            reserved1;
  1229.     long                            reserved2;
  1230.     AuthIOCompletionUPP                ioCompletion;
  1231.     OSErr                            ioResult;
  1232.     unsigned long                    saveA5;
  1233.     short                            reqCode;
  1234.     long                            reserved[2];
  1235.     AddrBlock                        serverHint;
  1236.     short                            dsRefNum;
  1237.     unsigned long                    callID;
  1238.     AuthIdentity                    identity;
  1239.     long                            gReserved1;
  1240.     long                            gReserved2;
  1241.     long                            gReserved3;
  1242.     long                            clientData;
  1243.     long                            aReserved;                    /*  --  */
  1244.     RStringPtr                        userName;                    /*  --> userName */
  1245.     RStringPtr                        password;                    /*  --> current password */
  1246.     RStringPtr                        newPassword;                /*  --> new password */
  1247. };
  1248. typedef struct AuthChangeLocalIdentityPB AuthChangeLocalIdentityPB;
  1249.  
  1250. /*
  1251. kAuthRemoveLocalIdentity:
  1252. An existing LocalIdentity  Setup can be removed using this call.
  1253. The userName and password correspond to the LocalIdentity setup.
  1254. If a LocalIdentity Setup does not exists 'kOCEOCESetupRequired' error
  1255. will be returned.
  1256. If the 'password' does not correspond to the existing setup, 'kOCELocalAuthenticationFail'
  1257. OSErr will be returned. If successful, LocalIdentity will be removed from the OCE Setup.
  1258. This is a very distructive operation, user must be warned enough before actually making
  1259. this call.
  1260. */
  1261. struct AuthRemoveLocalIdentityPB {
  1262.     Ptr                                qLink;
  1263.     long                            reserved1;
  1264.     long                            reserved2;
  1265.     AuthIOCompletionUPP                ioCompletion;
  1266.     OSErr                            ioResult;
  1267.     unsigned long                    saveA5;
  1268.     short                            reqCode;
  1269.     long                            reserved[2];
  1270.     AddrBlock                        serverHint;
  1271.     short                            dsRefNum;
  1272.     unsigned long                    callID;
  1273.     AuthIdentity                    identity;
  1274.     long                            gReserved1;
  1275.     long                            gReserved2;
  1276.     long                            gReserved3;
  1277.     long                            clientData;
  1278.     long                            aReserved;                    /*  --  */
  1279.     RStringPtr                        userName;                    /*  --> userName */
  1280.     RStringPtr                        password;                    /*  --> current password */
  1281. };
  1282. typedef struct AuthRemoveLocalIdentityPB AuthRemoveLocalIdentityPB;
  1283.  
  1284. /*
  1285. kOCESetupAddDirectoryInfo:
  1286. Using this call identity for a catalog can be setup under LocalIdentity umbrella.
  1287. ASCreateLocalIdentity should have been done succesfully before making this call.
  1288. directoryRecordCID -> is the record creationID obtained when DirAddOCEDirectory or
  1289. DirAddDSAMDirectory call was made.
  1290. rid-> is the recordID in which the identity for the catalog will be established.
  1291. password-> the password associated with the rid in the catalog world.
  1292. */
  1293. struct OCESetupAddDirectoryInfoPB {
  1294.     Ptr                                qLink;
  1295.     long                            reserved1;
  1296.     long                            reserved2;
  1297.     AuthIOCompletionUPP                ioCompletion;
  1298.     OSErr                            ioResult;
  1299.     unsigned long                    saveA5;
  1300.     short                            reqCode;
  1301.     long                            reserved[2];
  1302.     AddrBlock                        serverHint;
  1303.     short                            dsRefNum;
  1304.     unsigned long                    callID;
  1305.     AuthIdentity                    identity;
  1306.     long                            gReserved1;
  1307.     long                            gReserved2;
  1308.     long                            gReserved3;
  1309.     long                            clientData;
  1310.     CreationID                        directoryRecordCID;            /*  --> CreationID for the catalog */
  1311.     RecordIDPtr                        recordID;                    /*  --> recordID for the identity */
  1312.     RStringPtr                        password;                    /*  --> password in the catalog world */
  1313. };
  1314. typedef struct OCESetupAddDirectoryInfoPB OCESetupAddDirectoryInfoPB;
  1315.  
  1316. /*
  1317. kOCESetupChangeDirectoryInfo:
  1318. Using this call an existing identity for a catalog under LocalIdentity umbrella
  1319. can be changed.
  1320. ASCreateLocalIdentity should have been done succesfully before making this call.
  1321. directoryRecordCID -> is the record creationID obtained when DirAddOCEDirectory or
  1322. DirAddDSAMDirectory call was made.
  1323. rid-> is the recordID in which the identity for the catalog will be established.
  1324. password-> the password associated with the rid in the catalog world.
  1325. newPassword -> the new password for the catalog
  1326. */
  1327. struct OCESetupChangeDirectoryInfoPB {
  1328.     Ptr                                qLink;
  1329.     long                            reserved1;
  1330.     long                            reserved2;
  1331.     AuthIOCompletionUPP                ioCompletion;
  1332.     OSErr                            ioResult;
  1333.     unsigned long                    saveA5;
  1334.     short                            reqCode;
  1335.     long                            reserved[2];
  1336.     AddrBlock                        serverHint;
  1337.     short                            dsRefNum;
  1338.     unsigned long                    callID;
  1339.     AuthIdentity                    identity;
  1340.     long                            gReserved1;
  1341.     long                            gReserved2;
  1342.     long                            gReserved3;
  1343.     long                            clientData;
  1344.     CreationID                        directoryRecordCID;            /*  --> CreationID for the catalog */
  1345.     RecordIDPtr                        recordID;                    /*  --> recordID for the identity */
  1346.     RStringPtr                        password;                    /*  --> password in the catalog world */
  1347.     RStringPtr                        newPassword;                /*  --> new password in the catalog */
  1348. };
  1349. typedef struct OCESetupChangeDirectoryInfoPB OCESetupChangeDirectoryInfoPB;
  1350.  
  1351. /*
  1352. kOCESetupRemoveDirectoryInfo:
  1353. Using this call an existing identity for a catalog under LocalIdentity umbrella
  1354. can be changed.
  1355. ASCreateLocalIdentity should have been done succesfully before making this call.
  1356. directoryRecordCID -> is the record creationID obtained when DirAddOCEDirectory or
  1357. */
  1358. struct OCESetupRemoveDirectoryInfoPB {
  1359.     Ptr                                qLink;
  1360.     long                            reserved1;
  1361.     long                            reserved2;
  1362.     AuthIOCompletionUPP                ioCompletion;
  1363.     OSErr                            ioResult;
  1364.     unsigned long                    saveA5;
  1365.     short                            reqCode;
  1366.     long                            reserved[2];
  1367.     AddrBlock                        serverHint;
  1368.     short                            dsRefNum;
  1369.     unsigned long                    callID;
  1370.     AuthIdentity                    identity;
  1371.     long                            gReserved1;
  1372.     long                            gReserved2;
  1373.     long                            gReserved3;
  1374.     long                            clientData;
  1375.     CreationID                        directoryRecordCID;            /*  --> CreationID for the catalog */
  1376. };
  1377. typedef struct OCESetupRemoveDirectoryInfoPB OCESetupRemoveDirectoryInfoPB;
  1378.  
  1379. /*
  1380. kOCESetupGetDirectoryInfo:
  1381. Using this call info on an existing identity for a particular catalog under LocalIdentity umbrella
  1382. can be obtained.
  1383. For the specified catalog 'directoryName' and 'discriminator', rid and nativeName will
  1384. returned. Caller must provide appropriate buffer to get back rid and nativeName.
  1385. 'password' will be returned  for  non-ADAP Catalogs.
  1386. */
  1387. struct OCESetupGetDirectoryInfoPB {
  1388.     Ptr                                qLink;
  1389.     long                            reserved1;
  1390.     long                            reserved2;
  1391.     AuthIOCompletionUPP                ioCompletion;
  1392.     OSErr                            ioResult;
  1393.     unsigned long                    saveA5;
  1394.     short                            reqCode;
  1395.     long                            reserved[2];
  1396.     AddrBlock                        serverHint;
  1397.     short                            dsRefNum;
  1398.     unsigned long                    callID;
  1399.     AuthIdentity                    identity;
  1400.     long                            gReserved1;
  1401.     long                            gReserved2;
  1402.     long                            gReserved3;
  1403.     long                            clientData;
  1404.     DirectoryNamePtr                directoryName;                /*  --> catalog name */
  1405.     DirDiscriminator                discriminator;                /*  --> discriminator for the catalog */
  1406.     RecordIDPtr                        recordID;                    /* <--  rid for the catalog identity */
  1407.     RStringPtr                        nativeName;                    /* <--  user name in the catalog world */
  1408.     RStringPtr                        password;                    /* <--  password in the catalog world */
  1409. };
  1410. typedef struct OCESetupGetDirectoryInfoPB OCESetupGetDirectoryInfoPB;
  1411.  
  1412. /*****************************************************************************
  1413.  
  1414.  
  1415.          Catalog Manager operations
  1416.  
  1417.  
  1418. *****************************************************************************/
  1419. typedef union DirParamBlock DirParamBlock;
  1420.  
  1421. typedef DirParamBlock *DirParamBlockPtr;
  1422.  
  1423. typedef pascal void (*DirIOCompletionProcPtr)(DirParamBlockPtr paramBlock);
  1424.  
  1425. #if GENERATINGCFM
  1426. typedef UniversalProcPtr DirIOCompletionUPP;
  1427. #else
  1428. typedef DirIOCompletionProcPtr DirIOCompletionUPP;
  1429. #endif
  1430.  
  1431. #define DirParamHeader             \
  1432.     Ptr    qLink;                        \
  1433.     long    reserved1;                \
  1434.     long    reserved2;                \
  1435.     DirIOCompletionUPP    ioCompletion;     \
  1436.     OSErr    ioResult;                \
  1437.     unsigned long    saveA5;            \
  1438.     short    reqCode;                    \
  1439.     long    reserved[2];                \
  1440.     AddrBlock    serverHint;            \
  1441.     short    dsRefNum;                \
  1442.     unsigned long    callID;            \
  1443.     AuthIdentity    identity;            \
  1444.     long    gReserved1;                \
  1445.     long    gReserved2;                \
  1446.     long    gReserved3;                \
  1447.     long    clientData;
  1448. /* AddRecord */
  1449. struct DirAddRecordPB {
  1450.     Ptr                                qLink;
  1451.     long                            reserved1;
  1452.     long                            reserved2;
  1453.     DirIOCompletionUPP                ioCompletion;
  1454.     OSErr                            ioResult;
  1455.     unsigned long                    saveA5;
  1456.     short                            reqCode;
  1457.     long                            reserved[2];
  1458.     AddrBlock                        serverHint;
  1459.     short                            dsRefNum;
  1460.     unsigned long                    callID;
  1461.     AuthIdentity                    identity;
  1462.     long                            gReserved1;
  1463.     long                            gReserved2;
  1464.     long                            gReserved3;
  1465.     long                            clientData;
  1466.     RecordIDPtr                        aRecord;                    /*  --> CreationID returned here */
  1467.     Boolean                            allowDuplicate;                /*  --> */
  1468.     Boolean                            filler1;
  1469. };
  1470. typedef struct DirAddRecordPB DirAddRecordPB;
  1471.  
  1472. /* DeleteRecord */
  1473. struct DirDeleteRecordPB {
  1474.     Ptr                                qLink;
  1475.     long                            reserved1;
  1476.     long                            reserved2;
  1477.     DirIOCompletionUPP                ioCompletion;
  1478.     OSErr                            ioResult;
  1479.     unsigned long                    saveA5;
  1480.     short                            reqCode;
  1481.     long                            reserved[2];
  1482.     AddrBlock                        serverHint;
  1483.     short                            dsRefNum;
  1484.     unsigned long                    callID;
  1485.     AuthIdentity                    identity;
  1486.     long                            gReserved1;
  1487.     long                            gReserved2;
  1488.     long                            gReserved3;
  1489.     long                            clientData;
  1490.     RecordIDPtr                        aRecord;                    /*  --> */
  1491. };
  1492. typedef struct DirDeleteRecordPB DirDeleteRecordPB;
  1493.  
  1494. /* aRecord must contain valid PackedRLI and a CreationID. */
  1495. /**********************************************************************************/
  1496. /*
  1497. DirEnumerate:
  1498. This call can be used to enumerate both DNodes and records under a specified
  1499. DNode. A DNode is specified by the PackedRLIPtr 'aRLI'.
  1500.  
  1501. startingPoint indicates where to start the enumeration.  Initially,
  1502. it should be set to a value of nil.  After some records are enumerated,
  1503. the client can issue the call again with the same aRLI and recordName and
  1504. typeList. The last received DirEnumSpec in the startingPoint field.  The server
  1505. will continue the enumeration from that record on. if user wants to get back the
  1506. value specified in the startingRecord also, the Boolean 'includeStartingPoint'
  1507. must be set to 'true'. If this is set to 'false', records specified after the
  1508. startingPoint record will be returned.
  1509.  
  1510. sortBy indicates to the server to return the records that match in name-first
  1511. or type-first order.  sortDirection indicates to the server to search in forward
  1512. or backward sort order for RecordIDs Specified.
  1513.  
  1514. RecordIDS and Enumeration Criteria:
  1515.  
  1516. PackedRLIPtr parameter 'aRLI' will be accepted for DNode
  1517. specification.
  1518.  
  1519. One RStringPtr 'nameMatchString' is provided. User is allowed to
  1520. specify a wild card in the name. WildCard specification is specified in 
  1521. matchNameHow parameter and possible values are defined in DirMatchWith Enum.
  1522.  
  1523. 'typeCount' parameter indicate how many types are in the 'typeList'.
  1524.  
  1525. 'typeList' parmeter is a pointer to an RString array of size 'typeCount'.
  1526.  
  1527. If 'typeCount' is exactly equal to one, a wild card can be specified
  1528. for the entity type; otherwise types have to be completely specified.
  1529. WildCard specification is specified in  matchNameHow parameter
  1530.  and possible values are defined in DirMatchWith Enum.
  1531.  
  1532.  
  1533. A nil value for 'startingPoint' is allowed when sortDirection specified
  1534. is 'kSortBackwards'. This was not allowed previously.
  1535.  
  1536. 'enumFlags' parameter is a bit field. The following bits can be set:
  1537.     kEnumDistinguishedNameMask to get back records in the cluster data base.
  1538.     kEnumAliasMask to get back record aliases
  1539.     kEnumPseudonymMask to get back record pseudonyms
  1540.     kEnumDNodeMask to get back any children dNodes for the DNode specified in the
  1541.     'aRLI' parameter.
  1542.     kEnumForeignDNodeMask to get back any children dNodes which have ForeignDnodes in the
  1543.     dNode specified in the 'aRLI' parameter.
  1544.  
  1545.     kEnumAll is combination of all five values and can be used to enumerate
  1546.     everything under a specified DNode.
  1547.  
  1548.  
  1549.  
  1550. The results returned for each element will consist of a DirEnumSpec.
  1551. The DirEnumSpec contains 'enumFlag' which indicates the type of entity and a
  1552. union which will have either DNodeID or LocalRecordID depending on the value of 'enumFlag'.
  1553. The 'enumFlag'  will indicate whether the returned element is a
  1554. record(kEnumDistinguishedNameMask bit) or a alias(kEnumAliasMask bit) or a
  1555. Pseudonym(kEnumPseudonymMask) or a child DNode(kEnumDNodeMask bit).  If the 'enumFlag' value
  1556. is kEnumDnodeMask, it indicates the value returned in the union is a DNodeID (i.e. 'dNodeNumber'
  1557. is the 'dNodeNumber' of the child dnode(if the catalog supports dNodeNumbers, otherwise
  1558. this will be set to zero). The name will be the child dnode name. For other values of the
  1559. 'enumFlag', the value in the union will be LocalRecordID. In addition to kEnumDnodeMask it is
  1560. possible that kEnumForeignDNodeMask is also set. This is an advisory bit and application must make
  1561. it's own decision before displaying these records. If catalog supports kSupportIndexRatioMask, it
  1562. may also return the relative position of the record (percentile of total records) in the 
  1563. indexRatio field in EnumSpec.
  1564.  
  1565.  
  1566. responseSLRV will contain the script, language, region and version of the oce sorting software.
  1567. The results will be collected in the 'getBuffer' supplied by the user.
  1568. If buffer can not hold all the data returned 'kOCEMoreData' error will be returned.
  1569.  
  1570. If user receives 'noErr' or 'kOCEMoreData', buffer will contain valid results. A user
  1571. can extract the results in the 'getBuffer' by making DirEnumerateParse' call.
  1572. */
  1573. struct DirEnumerateGetPB {
  1574.     Ptr                                qLink;
  1575.     long                            reserved1;
  1576.     long                            reserved2;
  1577.     DirIOCompletionUPP                ioCompletion;
  1578.     OSErr                            ioResult;
  1579.     unsigned long                    saveA5;
  1580.     short                            reqCode;
  1581.     long                            reserved[2];
  1582.     AddrBlock                        serverHint;
  1583.     short                            dsRefNum;
  1584.     unsigned long                    callID;
  1585.     AuthIdentity                    identity;
  1586.     long                            gReserved1;
  1587.     long                            gReserved2;
  1588.     long                            gReserved3;
  1589.     long                            clientData;
  1590.     PackedRLIPtr                    aRLI;                        /*  --> an RLI specifying the cluster to be enumerated */
  1591.     DirEnumSpec                        *startingPoint;                /*  --> */
  1592.     DirSortOption                    sortBy;                        /*  --> */
  1593.     DirSortDirection                sortDirection;                /*  --> */
  1594.     long                            dReserved;                    /*  --  */
  1595.     RStringPtr                        nameMatchString;            /*  --> name from which enumeration should start */
  1596.     RStringPtr                        *typesList;                    /*  --> list of entity types to be enumerated */
  1597.     unsigned long                    typeCount;                    /*  --> number of types in the list */
  1598.     DirEnumChoices                    enumFlags;                    /*  --> indicates what to enumerate */
  1599.     Boolean                            includeStartingPoint;        /*  --> if true return the record specified in starting point */
  1600.     Byte                            padByte;
  1601.     DirMatchWith                    matchNameHow;                /*  --> Matching Criteria for nameMatchString */
  1602.     DirMatchWith                    matchTypeHow;                /*  --> Matching Criteria for typeList */
  1603.     Ptr                                getBuffer;                    /*  --> */
  1604.     unsigned long                    getBufferSize;                /*  --> */
  1605.     SLRV                            responseSLRV;                /*  <--  response SLRV */
  1606. };
  1607. typedef struct DirEnumerateGetPB DirEnumerateGetPB;
  1608.  
  1609. /* The EnumerateRecords call-back function is defined as follows: */
  1610. typedef pascal Boolean (*ForEachDirEnumSpecProcPtr)(long clientData, const DirEnumSpec *enumSpec);
  1611.  
  1612. #if GENERATINGCFM
  1613. typedef UniversalProcPtr ForEachDirEnumSpecUPP;
  1614. #else
  1615. typedef ForEachDirEnumSpecProcPtr ForEachDirEnumSpecUPP;
  1616. #endif
  1617.  
  1618. typedef ForEachDirEnumSpecUPP ForEachDirEnumSpec;
  1619.  
  1620. /*
  1621. EnumerateParse:
  1622. After an EnumerateGet call has completed, call EnumerateParse
  1623. to parse through the buffer that was filled in EnumerateGet.
  1624.  
  1625. 'eachEnumSpec' will be called each time to return to the client a
  1626. DirEnumSpec that matches the pattern for enumeration. 'enumFlag' indicates the type
  1627. of information returned in the DirEnumSpec
  1628. The clientData parameter that you pass in the parameter block will be passed
  1629. to 'forEachEnumDSSpecFunc'.  You are free to put anything in clientData - it is intended
  1630. to allow you some way to match the call-back to the original call (for
  1631. example, you make more then one aysynchronous EnumerateGet calls and you want to
  1632. associate returned results in some way).
  1633.  
  1634. The client should return FALSE from 'eachEnumSpec' to continue
  1635. processing of the EnumerateParse request.  Returning TRUE will
  1636. terminate the EnumerateParse request.
  1637.  
  1638. For synchronous calls, the call-back routine actually runs as part of the same thread
  1639. of execution as the thread that made the EnumerateParse call.  That means that the
  1640. same low-memory globals, A5, stack, etc. are in effect during the call-back
  1641. that were in effect when the call was made.  Because of this, the call-back
  1642. routine has the same restrictions as the caller of EnumerateParse:
  1643. if EnumerateParse was not called from interrupt level, then the call-
  1644. back routine can allocate memory. For asynchronous calls, call-back routine is
  1645. like a ioCompletion except that A5 will be preserved for the application.
  1646. */
  1647. struct DirEnumerateParsePB {
  1648.     Ptr                                qLink;
  1649.     long                            reserved1;
  1650.     long                            reserved2;
  1651.     DirIOCompletionUPP                ioCompletion;
  1652.     OSErr                            ioResult;
  1653.     unsigned long                    saveA5;
  1654.     short                            reqCode;
  1655.     long                            reserved[2];
  1656.     AddrBlock                        serverHint;
  1657.     short                            dsRefNum;
  1658.     unsigned long                    callID;
  1659.     AuthIdentity                    identity;
  1660.     long                            gReserved1;
  1661.     long                            gReserved2;
  1662.     long                            gReserved3;
  1663.     long                            clientData;
  1664.     PackedRLIPtr                    aRLI;                        /*  --> an RLI specifying the cluster to be enumerated */
  1665.     long                            bReserved;                    /*  --  */
  1666.     long                            cReserved;                    /*  --  */
  1667.     ForEachDirEnumSpec                eachEnumSpec;                /*  --> */
  1668.     long                            eReserved;                    /*  --  */
  1669.     long                            fReserved;                    /*  --  */
  1670.     long                            gReserved;                    /*  --  */
  1671.     long                            hReserved;                    /*  --  */
  1672.     long                            iReserved;                    /*  --  */
  1673.     Ptr                                getBuffer;                    /*  --> */
  1674.     unsigned long                    getBufferSize;                /*  --> */
  1675.     short                            l1Reserved;                    /*  -- */
  1676.     short                            l2Reserved;                    /*  --  */
  1677.     short                            l3Reserved;                    /*  -- */
  1678.     short                            l4Reserved;                    /*  --  */
  1679. };
  1680. typedef struct DirEnumerateParsePB DirEnumerateParsePB;
  1681.  
  1682. /*
  1683.  * FindRecordGet operates similarly to DirEnumerate except it returns a list
  1684.  * of records instead of records local to a cluster.
  1685. */
  1686. struct DirFindRecordGetPB {
  1687.     Ptr                                qLink;
  1688.     long                            reserved1;
  1689.     long                            reserved2;
  1690.     DirIOCompletionUPP                ioCompletion;
  1691.     OSErr                            ioResult;
  1692.     unsigned long                    saveA5;
  1693.     short                            reqCode;
  1694.     long                            reserved[2];
  1695.     AddrBlock                        serverHint;
  1696.     short                            dsRefNum;
  1697.     unsigned long                    callID;
  1698.     AuthIdentity                    identity;
  1699.     long                            gReserved1;
  1700.     long                            gReserved2;
  1701.     long                            gReserved3;
  1702.     long                            clientData;
  1703.     RecordIDPtr                        startingPoint;
  1704.     long                            reservedA[2];
  1705.     RStringPtr                        nameMatchString;
  1706.     RStringPtr                        *typesList;
  1707.     unsigned long                    typeCount;
  1708.     long                            reservedB;
  1709.     short                            reservedC;
  1710.     DirMatchWith                    matchNameHow;
  1711.     DirMatchWith                    matchTypeHow;
  1712.     Ptr                                getBuffer;
  1713.     unsigned long                    getBufferSize;
  1714.     DirectoryNamePtr                directoryName;
  1715.     DirDiscriminator                discriminator;
  1716. };
  1717. typedef struct DirFindRecordGetPB DirFindRecordGetPB;
  1718.  
  1719. /* The FindRecordParse call-back function is defined as follows: */
  1720. typedef pascal Boolean (*ForEachRecordProcPtr)(long clientData, const DirEnumSpec *enumSpec, PackedRLIPtr pRLI);
  1721.  
  1722. #if GENERATINGCFM
  1723. typedef UniversalProcPtr ForEachRecordUPP;
  1724. #else
  1725. typedef ForEachRecordProcPtr ForEachRecordUPP;
  1726. #endif
  1727.  
  1728. typedef ForEachRecordUPP ForEachRecord;
  1729.  
  1730. /*
  1731.  * This PB same as DirFindRecordGet except it includes the callback function
  1732. */
  1733. struct DirFindRecordParsePB {
  1734.     Ptr                                qLink;
  1735.     long                            reserved1;
  1736.     long                            reserved2;
  1737.     DirIOCompletionUPP                ioCompletion;
  1738.     OSErr                            ioResult;
  1739.     unsigned long                    saveA5;
  1740.     short                            reqCode;
  1741.     long                            reserved[2];
  1742.     AddrBlock                        serverHint;
  1743.     short                            dsRefNum;
  1744.     unsigned long                    callID;
  1745.     AuthIdentity                    identity;
  1746.     long                            gReserved1;
  1747.     long                            gReserved2;
  1748.     long                            gReserved3;
  1749.     long                            clientData;
  1750.     RecordIDPtr                        startingPoint;
  1751.     long                            reservedA[2];
  1752.     RStringPtr                        nameMatchString;
  1753.     RStringPtr                        *typesList;
  1754.     unsigned long                    typeCount;
  1755.     long                            reservedB;
  1756.     short                            reservedC;
  1757.     DirMatchWith                    matchNameHow;
  1758.     DirMatchWith                    matchTypeHow;
  1759.     Ptr                                getBuffer;
  1760.     unsigned long                    getBufferSize;
  1761.     DirectoryNamePtr                directoryName;
  1762.     DirDiscriminator                discriminator;
  1763.     ForEachRecord                    forEachRecordFunc;
  1764. };
  1765. typedef struct DirFindRecordParsePB DirFindRecordParsePB;
  1766.  
  1767. /*
  1768. LookupGet:
  1769.  
  1770. aRecordList is an array of pointers to RecordIDs, each of which must
  1771. contain valid PackedRLI and a CreationID.  recordIDCount is
  1772. the size of this array.
  1773.  
  1774. attrTypeList is an array of pointers to AttributeTypes.  attrTypeCount is
  1775. the size of this array.
  1776.  
  1777. staringRecordIndex is the record from which to continue the lookup.
  1778. If you want to start from first record in the list, this must be 1 (not zero).
  1779. This value must always be <= recordIDCount.
  1780.  
  1781. startingAttributeIndex is the AttributeType from which we want to continue the lookup.
  1782. If you want to start from first attribute in the list, this must be 1 (not zero).
  1783. This value must always be <= attrTypeCount.
  1784.  
  1785. startingAttribute is the value of the attribute value from which we want to
  1786. continue lookup. In case of catalogs supporting creationIDs, startingAttribute
  1787. may contain only a CID. Other catalogs may require the entire value.
  1788. If a non-null cid is given and if an attribute value with that cid is not found, this
  1789. call will terminate with kOCENoSuchAttribute error. A client should not make a LookupParse call
  1790. after getting this error.
  1791.  
  1792. 'includeStartingPoint' boolean can be set to 'true' to receive the value specified in the
  1793. startingPoint in the results returned. If this is set to 'false', the value
  1794. specified in the startingAttribute will not be returned.
  1795.  
  1796. When LookupGet call fails with kOCEMoreData, the client will be able to find out where the call ended
  1797. with a subsequent LookupParse call. When the LookupParse call completes with kOCEMoreData,
  1798. lastRecordIndex, lastAttributeIndex and lastValueCID will point to the corresponding
  1799. recordID, attributeType and the CreationID of the last value returned successfully. These parameters
  1800. are exactly the same ones for the startingRecordIndex, startingAttributeIndex, and startingAttrValueCID
  1801. so they can be used in a subsequent LookupGet call to continue the lookup.
  1802.  
  1803. In an extreme case, It is possible that we had an attribute value that is too large to fit
  1804. in the client's buffer. In such cases, if it was the only thing that we tried to fit
  1805. into the buffer, the client will not able to proceed further because he will not know the
  1806. attributeCID of the attribute to continue with.  Also he does not know how big a buffer
  1807. would be needed for the next call to get this 'mondo' attribute value successfully.
  1808.  
  1809. to support this, LookupParse call will do the following:
  1810.  
  1811. If LookupGet has failed with kOCEMoreData error, LookupParse will check to make sure that
  1812. ForEachAttributeValueFunc has been called at least once. If so, the client has the option
  1813. to continue from that attribute CreationID (for PAB/ADAP) in the next LookupGet call.
  1814. However, if it was not even called once, then the attribute value may be too big to fit in the
  1815. user's buffer. In this case, lastAttrValueCID (lastAttribute) and attrSize are returned in the
  1816. parse buffer and the call will fail with kOCEMoreAttrValue. However, it is possible that
  1817. ForEachAttributeValue was not called because the user does not have read access to some of
  1818. the attributeTypes in the list, and the buffer was full before even reading the creationID of
  1819. any of the attribute values.  A kOCEMoreData error is returned.
  1820.  
  1821. The Toolbox will check for duplicate RecordIDs in the aRecordList. If found, it will return
  1822. 'daDuplicateRecordIDErr'.
  1823.  
  1824. The Toolbox will check for duplicate AttributeTypes in the attrTypeList. If found it will
  1825. return 'daDuplicateAttrTypeErr'.
  1826. */
  1827. struct DirLookupGetPB {
  1828.     Ptr                                qLink;
  1829.     long                            reserved1;
  1830.     long                            reserved2;
  1831.     DirIOCompletionUPP                ioCompletion;
  1832.     OSErr                            ioResult;
  1833.     unsigned long                    saveA5;
  1834.     short                            reqCode;
  1835.     long                            reserved[2];
  1836.     AddrBlock                        serverHint;
  1837.     short                            dsRefNum;
  1838.     unsigned long                    callID;
  1839.     AuthIdentity                    identity;
  1840.     long                            gReserved1;
  1841.     long                            gReserved2;
  1842.     long                            gReserved3;
  1843.     long                            clientData;
  1844.     RecordIDPtr                        *aRecordList;                /*  --> an array of RecordID pointers */
  1845.     AttributeTypePtr                *attrTypeList;                /*  --> an array of attribute types */
  1846.     long                            cReserved;                    /*  --  */
  1847.     long                            dReserved;                    /*  --  */
  1848.     long                            eReserved;                    /*  --  */
  1849.     long                            fReserved;                    /*  --  */
  1850.     unsigned long                    recordIDCount;                /*  --> */
  1851.     unsigned long                    attrTypeCount;                /*  --> */
  1852.     Boolean                            includeStartingPoint;        /*  --> if true return the value specified by the starting indices */
  1853.     Byte                            padByte;
  1854.     short                            i1Reserved;                    /*  --  */
  1855.     Ptr                                getBuffer;                    /*  --> */
  1856.     unsigned long                    getBufferSize;                /*  --> */
  1857.     unsigned long                    startingRecordIndex;        /*  --> start from this record */
  1858.     unsigned long                    startingAttrTypeIndex;        /*  --> start from this attribute type */
  1859.     Attribute                        startingAttribute;            /*  --> start from this attribute value */
  1860.     long                            pReserved;                    /*  --  */
  1861. };
  1862. typedef struct DirLookupGetPB DirLookupGetPB;
  1863.  
  1864. /* The Lookup call-back functions are defined as follows: */
  1865. typedef pascal Boolean (*ForEachLookupRecordIDProcPtr)(long clientData, const RecordID *recordID);
  1866.  
  1867. #if GENERATINGCFM
  1868. typedef UniversalProcPtr ForEachLookupRecordIDUPP;
  1869. #else
  1870. typedef ForEachLookupRecordIDProcPtr ForEachLookupRecordIDUPP;
  1871. #endif
  1872.  
  1873. typedef ForEachLookupRecordIDUPP ForEachLookupRecordID;
  1874.  
  1875. typedef pascal Boolean (*ForEachAttrTypeLookupProcPtr)(long clientData, const AttributeType *attrType, AccessMask myAttrAccMask);
  1876.  
  1877. #if GENERATINGCFM
  1878. typedef UniversalProcPtr ForEachAttrTypeLookupUPP;
  1879. #else
  1880. typedef ForEachAttrTypeLookupProcPtr ForEachAttrTypeLookupUPP;
  1881. #endif
  1882.  
  1883. typedef ForEachAttrTypeLookupUPP ForEachAttrTypeLookup;
  1884.  
  1885. typedef pascal Boolean (*ForEachAttrValueProcPtr)(long clientData, const Attribute *attribute);
  1886.  
  1887. #if GENERATINGCFM
  1888. typedef UniversalProcPtr ForEachAttrValueUPP;
  1889. #else
  1890. typedef ForEachAttrValueProcPtr ForEachAttrValueUPP;
  1891. #endif
  1892.  
  1893. typedef ForEachAttrValueUPP ForEachAttrValue;
  1894.  
  1895. /*
  1896. LookupParse:
  1897.  
  1898. After a LookupGet call has completed, call LookupParse
  1899. to parse through the buffer that was filled in LookupGet.  The
  1900. toolbox will parse through the buffer and call the appropriate call-back routines
  1901. for each item in the getBuffer.
  1902.  
  1903. 'eachRecordID' will be called each time to return to the client one of the
  1904. RecordIDs from aRecordList.  The clientData parameter that you
  1905. pass in the parameter block will be passed to eachRecordID.
  1906. You are free to put anything in clientData - it is intended to allow
  1907. you some way to match the call-back to the original call (in case, for
  1908. example, you make simultaneous asynchronous LookupGet calls).  If you don't
  1909. want to get a call-back for each RecordID (for example, if you're looking up
  1910. attributes for only one RecordID), pass nil for eachRecordID.
  1911.  
  1912. After forEachLocalRecordIDFunc is called, eachAttrType may be called to pass an
  1913. attribute type (one from attrTypeList) that exists in the record specified
  1914. in the last eachRecordID call.  If you don't want to get a call-back for
  1915. each AttributeType (for example, if you're looking up only one attribute type,
  1916. or you prefer to read the type from the Attribute struct during the eachAttrValue
  1917. call-back routine), pass nil for eachAttrType. However access controls may
  1918. prohibit you from reading some attribute types; in that case eachAttrValue
  1919. may not be called even though the value exists. Hence the client should
  1920. supply this call-back function to see the access controls for each attribute type.
  1921.  
  1922. This will be followed by one or more calls to eachAttrValue, to pass the
  1923. type, tag, and attribute value.  NOTE THIS CHANGE:  you are no longer expected to
  1924. pass a pointer to a buffer in which to put the value.  Now you get a pointer to
  1925. the value, and you can process it within the call-back routine.
  1926. After one or more values are returned, eachAttrType may be called again to pass
  1927. another attribute type that exists in the last-specified RecordID.
  1928.  
  1929. The client should return FALSE from eachRecordID, eachAttrType, and
  1930. eachAttrValue to continue processing of the LookupParse request.  Returning TRUE
  1931. from any call-back will terminate the LookupParse request.
  1932.  
  1933. If LookupGet has failed with kOCEMoreData error, LookupParse will check to make sure that
  1934. ForEachAttributeValueFunc has been called at least once. If so, the client has the option
  1935. to continue from that attribute CreationID (for PAB/ADAP) in the next LookupGet call.
  1936. However, if it was not even called once, then the attribute value may be too big to fit in the
  1937. user's buffer. In this case, lastAttrValueCID (lastAttribute) and attrSize are returned in the
  1938. parse buffer and the call will fail with kOCEMoreAttrValue. However, it is possible that
  1939. ForEachAttributeValue was not called because the user does not have read access to some of
  1940. the attributeTypes in the list, and the buffer was full before even reading the creationID of
  1941. any of the attribute values.  A kOCEMoreData error is returned.
  1942.  
  1943. For synchronous calls, the call-back routine actually runs as part of the same thread
  1944. of execution as the thread that made the LookupParse call.  That means that the
  1945. same low-memory globals, A5, stack, etc. are in effect during the call-back
  1946. that were in effect when the call was made.  Because of this, the call-back
  1947. routine has the same restrictions as the caller of LookupParse:
  1948. if LookupParse was not called from interrupt level, then the call-
  1949. back routine can allocate memory. For asynchronous calls, call-back routine is
  1950. like a ioCompletion except that A5 will be preserved for the application.
  1951. */
  1952. struct DirLookupParsePB {
  1953.     Ptr                                qLink;
  1954.     long                            reserved1;
  1955.     long                            reserved2;
  1956.     DirIOCompletionUPP                ioCompletion;
  1957.     OSErr                            ioResult;
  1958.     unsigned long                    saveA5;
  1959.     short                            reqCode;
  1960.     long                            reserved[2];
  1961.     AddrBlock                        serverHint;
  1962.     short                            dsRefNum;
  1963.     unsigned long                    callID;
  1964.     AuthIdentity                    identity;
  1965.     long                            gReserved1;
  1966.     long                            gReserved2;
  1967.     long                            gReserved3;
  1968.     long                            clientData;
  1969.     RecordIDPtr                        *aRecordList;                /*  --> must be same from the corresponding Get call */
  1970.     AttributeTypePtr                *attrTypeList;                /*  --> must be same from the corresponding Get call */
  1971.     long                            cReserved;                    /*  --  */
  1972.     ForEachLookupRecordID            eachRecordID;                /*  --> */
  1973.     ForEachAttrTypeLookup            eachAttrType;                /*  --> */
  1974.     ForEachAttrValue                eachAttrValue;                /*  --> */
  1975.     unsigned long                    recordIDCount;                /*  --> must be same from the corresponding Get call */
  1976.     unsigned long                    attrTypeCount;                /*  --> must be same from the corresponding Get call */
  1977.     long                            iReserved;                    /*  --  */
  1978.     Ptr                                getBuffer;                    /*  --> must be same from the corresponding Get call*/
  1979.     unsigned long                    getBufferSize;                /*  --> must be same from the corresponding Get call*/
  1980.     unsigned long                    lastRecordIndex;            /* <--  last RecordID processed when parse completed */
  1981.     unsigned long                    lastAttributeIndex;            /* <--  last Attribute Type processed when parse completed */
  1982.     Attribute                        lastAttribute;                /* <--  last attribute value (with this CreationID) processed when parse completed */
  1983.     unsigned long                    attrSize;                    /* <--  length of the attribute we did not return */
  1984. };
  1985. typedef struct DirLookupParsePB DirLookupParsePB;
  1986.  
  1987. /* AddAttributeValue */
  1988. struct DirAddAttributeValuePB {
  1989.     Ptr                                qLink;
  1990.     long                            reserved1;
  1991.     long                            reserved2;
  1992.     DirIOCompletionUPP                ioCompletion;
  1993.     OSErr                            ioResult;
  1994.     unsigned long                    saveA5;
  1995.     short                            reqCode;
  1996.     long                            reserved[2];
  1997.     AddrBlock                        serverHint;
  1998.     short                            dsRefNum;
  1999.     unsigned long                    callID;
  2000.     AuthIdentity                    identity;
  2001.     long                            gReserved1;
  2002.     long                            gReserved2;
  2003.     long                            gReserved3;
  2004.     long                            clientData;
  2005.     RecordIDPtr                        aRecord;                    /*  --> */
  2006.     AttributePtr                    attr;                        /*  --> AttributeCreationID returned here */
  2007. };
  2008. typedef struct DirAddAttributeValuePB DirAddAttributeValuePB;
  2009.  
  2010. /*
  2011. aRecord must contain valid PackedRLI and a CreationID.
  2012.  
  2013. Instead of passing type, length, and value in three separate
  2014. fields, we take a pointer to an Attribute structure that contains
  2015. all three, and has room for the AttributeCreationNumber.
  2016. The AttributeCreationID will be returned in the attr itself.
  2017.  
  2018. The AttributeTag tells the catalog service that the attribute is an RString,
  2019. binary, or a RecordID.
  2020. */
  2021. /*
  2022. DeleteAttributeType:
  2023. This call is provided so that an existing AttributeType can be deleted.
  2024. If any attribute values exist for this type, they will all be deleted
  2025. (if the user has access rights to delete the values) and then the attribute type
  2026. will be deleted. Otherwise dsAccessDenied error will be returned.
  2027. */
  2028. struct DirDeleteAttributeTypePB {
  2029.     Ptr                                qLink;
  2030.     long                            reserved1;
  2031.     long                            reserved2;
  2032.     DirIOCompletionUPP                ioCompletion;
  2033.     OSErr                            ioResult;
  2034.     unsigned long                    saveA5;
  2035.     short                            reqCode;
  2036.     long                            reserved[2];
  2037.     AddrBlock                        serverHint;
  2038.     short                            dsRefNum;
  2039.     unsigned long                    callID;
  2040.     AuthIdentity                    identity;
  2041.     long                            gReserved1;
  2042.     long                            gReserved2;
  2043.     long                            gReserved3;
  2044.     long                            clientData;
  2045.     RecordIDPtr                        aRecord;                    /*  --> */
  2046.     AttributeTypePtr                attrType;                    /*  --> */
  2047. };
  2048. typedef struct DirDeleteAttributeTypePB DirDeleteAttributeTypePB;
  2049.  
  2050. /*
  2051.     DeleteAttributeValue
  2052. */
  2053. struct DirDeleteAttributeValuePB {
  2054.     Ptr                                qLink;
  2055.     long                            reserved1;
  2056.     long                            reserved2;
  2057.     DirIOCompletionUPP                ioCompletion;
  2058.     OSErr                            ioResult;
  2059.     unsigned long                    saveA5;
  2060.     short                            reqCode;
  2061.     long                            reserved[2];
  2062.     AddrBlock                        serverHint;
  2063.     short                            dsRefNum;
  2064.     unsigned long                    callID;
  2065.     AuthIdentity                    identity;
  2066.     long                            gReserved1;
  2067.     long                            gReserved2;
  2068.     long                            gReserved3;
  2069.     long                            clientData;
  2070.     RecordIDPtr                        aRecord;                    /*  -> */
  2071.     AttributePtr                    attr;                        /*  -> */
  2072. };
  2073. typedef struct DirDeleteAttributeValuePB DirDeleteAttributeValuePB;
  2074.  
  2075. /*
  2076.     ChangeAttributeValue:
  2077.     currentAttr ==> the attribute to be changed. For ADAS and PAB CreationID is
  2078.                     sufficient
  2079.     newAttr     ==> new value for the attribute. For ADAS and PAB 
  2080.                     CreationID field will be set when
  2081.                     the call succeesfully completes
  2082.     
  2083.     aRecord     ==> must contain valid PackedRecordLocationInfo and a CreationID.
  2084.  
  2085.  
  2086.     
  2087. */
  2088. struct DirChangeAttributeValuePB {
  2089.     Ptr                                qLink;
  2090.     long                            reserved1;
  2091.     long                            reserved2;
  2092.     DirIOCompletionUPP                ioCompletion;
  2093.     OSErr                            ioResult;
  2094.     unsigned long                    saveA5;
  2095.     short                            reqCode;
  2096.     long                            reserved[2];
  2097.     AddrBlock                        serverHint;
  2098.     short                            dsRefNum;
  2099.     unsigned long                    callID;
  2100.     AuthIdentity                    identity;
  2101.     long                            gReserved1;
  2102.     long                            gReserved2;
  2103.     long                            gReserved3;
  2104.     long                            clientData;
  2105.     RecordIDPtr                        aRecord;                    /*  -> */
  2106.     AttributePtr                    currentAttr;                /*  -> */
  2107.     AttributePtr                    newAttr;                    /*  -> */
  2108. };
  2109. typedef struct DirChangeAttributeValuePB DirChangeAttributeValuePB;
  2110.  
  2111. /* VerifyAttributeValue */
  2112. struct DirVerifyAttributeValuePB {
  2113.     Ptr                                qLink;
  2114.     long                            reserved1;
  2115.     long                            reserved2;
  2116.     DirIOCompletionUPP                ioCompletion;
  2117.     OSErr                            ioResult;
  2118.     unsigned long                    saveA5;
  2119.     short                            reqCode;
  2120.     long                            reserved[2];
  2121.     AddrBlock                        serverHint;
  2122.     short                            dsRefNum;
  2123.     unsigned long                    callID;
  2124.     AuthIdentity                    identity;
  2125.     long                            gReserved1;
  2126.     long                            gReserved2;
  2127.     long                            gReserved3;
  2128.     long                            clientData;
  2129.     RecordIDPtr                        aRecord;                    /*  --> */
  2130.     AttributePtr                    attr;                        /*  --> */
  2131. };
  2132. typedef struct DirVerifyAttributeValuePB DirVerifyAttributeValuePB;
  2133.  
  2134. /*
  2135. aRecord must contain valid PackedRLI and a CreationID.
  2136.  
  2137. The attribute type and value are passed in the attribute structure.  If the
  2138. attribute CreationID is non-zero, the server will verify that an attribute with
  2139. the specified value and creation number exists in aRecord.  If the attribute
  2140. CreationID is zero, the server will verify the attribute by type and value
  2141. alone, and return the attribute CreationID in the Attribute struct if the
  2142. attribute exists.
  2143. */
  2144. /*
  2145. EnumerateAttributeTypesGet:
  2146. The following two calls can be used to enumerate the attribute types present in
  2147. a specified RecordID.  The first, EnumerateAttributeTypesGet, processes the request
  2148. and reads the response into getBuffer, as much as will fit.  A kOCEMoreData error will
  2149. be returned if the buffer was not large enough.  After this call completes, the
  2150. client can call EnumerateAttributeTypesParse (see below).
  2151.  
  2152. The user will able to continue from a startingPoint by setting a startingAttrType.
  2153. Typically, this should be the last value returned in EnumerateAttributeTypesParse call
  2154. when 'kOCEMoreData' is returned.
  2155.  
  2156. If 'includeStartingPoint' is true when a 'startingAttrType' is specified, the starting value
  2157. will be included in the results, if it exists. If this is set to false, this value will not
  2158. be included. AttributeTypes following this type will be returned.
  2159. */
  2160. struct DirEnumerateAttributeTypesGetPB {
  2161.     Ptr                                qLink;
  2162.     long                            reserved1;
  2163.     long                            reserved2;
  2164.     DirIOCompletionUPP                ioCompletion;
  2165.     OSErr                            ioResult;
  2166.     unsigned long                    saveA5;
  2167.     short                            reqCode;
  2168.     long                            reserved[2];
  2169.     AddrBlock                        serverHint;
  2170.     short                            dsRefNum;
  2171.     unsigned long                    callID;
  2172.     AuthIdentity                    identity;
  2173.     long                            gReserved1;
  2174.     long                            gReserved2;
  2175.     long                            gReserved3;
  2176.     long                            clientData;
  2177.     RecordIDPtr                        aRecord;                    /*  --> */
  2178.     AttributeTypePtr                startingAttrType;            /*  --> starting point */
  2179.     long                            cReserved;                    /*  --  */
  2180.     long                            dReserved;                    /*  --  */
  2181.     long                            eReserved;                    /*  --  */
  2182.     long                            fReserved;                    /*  --  */
  2183.     long                            gReserved;                    /*  --  */
  2184.     long                            hReserved;                    /*  --  */
  2185.     Boolean                            includeStartingPoint;        /*  --> if true return the attrType specified by starting point */
  2186.     Byte                            padByte;
  2187.     short                            i1Reserved;                    /*  --  */
  2188.     Ptr                                getBuffer;                    /*  --> */
  2189.     unsigned long                    getBufferSize;                /*  --> */
  2190. };
  2191. typedef struct DirEnumerateAttributeTypesGetPB DirEnumerateAttributeTypesGetPB;
  2192.  
  2193. /* The call-back function is defined as follows: */
  2194. typedef pascal Boolean (*ForEachAttrTypeProcPtr)(long clientData, const AttributeType *attrType);
  2195.  
  2196. #if GENERATINGCFM
  2197. typedef UniversalProcPtr ForEachAttrTypeUPP;
  2198. #else
  2199. typedef ForEachAttrTypeProcPtr ForEachAttrTypeUPP;
  2200. #endif
  2201.  
  2202. typedef ForEachAttrTypeUPP ForEachAttrType;
  2203.  
  2204. /*
  2205. EnumerateAttributeTypesParse:
  2206. After an EnumerateAttributeTypesGet call has completed, call EnumerateAttributeTypesParse
  2207. to parse through the buffer that was filled in EnumerateAttributeTypesGet.  The
  2208. toolbox will parse through the buffer and call the call-back routine for
  2209. each attribute type in the getBuffer.
  2210.  
  2211. The client should return false from eachAttrType to continue
  2212. processing of the EnumerateAttributeTypesParse request.  Returning true will
  2213. terminate the EnumerateAttributeTypesParse request.  The clientData parameter that
  2214. you pass in the parameter block will be passed to eachAttrType.
  2215. You are free to put anything in clientData - it is intended to allow
  2216. you some way to match the call-back to the original call (in case, for
  2217. example, you make simultaneous asynchronous calls).
  2218.  
  2219. For synchronous calls, the call-back routine actually runs as part of the same thread
  2220. of execution as the thread that made the EnumerateAttributeTypesParse call.  That means that the
  2221. same low-memory globals, A5, stack, etc. are in effect during the call-back
  2222. that were in effect when the call was made.  Because of this, the call-back
  2223. routine has the same restrictions as the caller of EnumerateAttributeTypesParse.
  2224. If EnumerateAttributeTypesParse was not called from interrupt level, then the call-
  2225. back routine can allocate memory. For asynchronous calls, call-back routine is
  2226. like a ioCompletion except that A5 will be preserved for the application.
  2227. */
  2228. struct DirEnumerateAttributeTypesParsePB {
  2229.     Ptr                                qLink;
  2230.     long                            reserved1;
  2231.     long                            reserved2;
  2232.     DirIOCompletionUPP                ioCompletion;
  2233.     OSErr                            ioResult;
  2234.     unsigned long                    saveA5;
  2235.     short                            reqCode;
  2236.     long                            reserved[2];
  2237.     AddrBlock                        serverHint;
  2238.     short                            dsRefNum;
  2239.     unsigned long                    callID;
  2240.     AuthIdentity                    identity;
  2241.     long                            gReserved1;
  2242.     long                            gReserved2;
  2243.     long                            gReserved3;
  2244.     long                            clientData;
  2245.     RecordIDPtr                        aRecord;                    /*  --> Same as DirEnumerateAttributeTypesGetPB */
  2246.     long                            bReserved;                    /*  --  */
  2247.     long                            cReserved;                    /*  --  */
  2248.     long                            dReserved;                    /*  --  */
  2249.     ForEachAttrType                    eachAttrType;                /*  --> */
  2250.     long                            fReserved;                    /*  --  */
  2251.     long                            gReserved;                    /*  --  */
  2252.     long                            hReserved;                    /*  --  */
  2253.     long                            iReserved;                    /*  --  */
  2254.     Ptr                                getBuffer;                    /*  --> */
  2255.     unsigned long                    getBufferSize;                /*  --> */
  2256. };
  2257. typedef struct DirEnumerateAttributeTypesParsePB DirEnumerateAttributeTypesParsePB;
  2258.  
  2259. /*
  2260. DirAbort:
  2261. With this call a user will able to abort an outstanding catalog service call.
  2262. A user must pass a pointer to the parameter block for the outstanding call.
  2263. In the current version of the product, the toolbox will process this call
  2264. for NetSearchADAPDirectoriesGet or FindADAPDirectoryByNetSearch calls and if possible
  2265. it will abort. For other calls for ADAP and PAB this will return 'daAbortFailErr'.
  2266. For CSAM catalogs, this call will be passed to the corresponding CSAM driver.
  2267. The CSAM driver may process this call or may return 'daAbortFailErr'. This call can
  2268. be called only in synchronous mode. Since the abort call makes references to fields in
  2269. the pb associated with the original call, this pb must not be disposed or or altered if
  2270. the original call completes before the abort call has completed.
  2271. */
  2272. struct DirAbortPB {
  2273.     Ptr                                qLink;
  2274.     long                            reserved1;
  2275.     long                            reserved2;
  2276.     DirIOCompletionUPP                ioCompletion;
  2277.     OSErr                            ioResult;
  2278.     unsigned long                    saveA5;
  2279.     short                            reqCode;
  2280.     long                            reserved[2];
  2281.     AddrBlock                        serverHint;
  2282.     short                            dsRefNum;
  2283.     unsigned long                    callID;
  2284.     AuthIdentity                    identity;
  2285.     long                            gReserved1;
  2286.     long                            gReserved2;
  2287.     long                            gReserved3;
  2288.     long                            clientData;
  2289.     DirParamBlock                    *pb;                        /*  --> pb for the call which must be aborted */
  2290. };
  2291. typedef struct DirAbortPB DirAbortPB;
  2292.  
  2293. /*
  2294. AddPseudonym:
  2295. An alternate name and type can be added to a given record. If allowDuplicate
  2296. is set the name and type will be added even if the same name and type already
  2297. exists.
  2298. */
  2299. struct DirAddPseudonymPB {
  2300.     Ptr                                qLink;
  2301.     long                            reserved1;
  2302.     long                            reserved2;
  2303.     DirIOCompletionUPP                ioCompletion;
  2304.     OSErr                            ioResult;
  2305.     unsigned long                    saveA5;
  2306.     short                            reqCode;
  2307.     long                            reserved[2];
  2308.     AddrBlock                        serverHint;
  2309.     short                            dsRefNum;
  2310.     unsigned long                    callID;
  2311.     AuthIdentity                    identity;
  2312.     long                            gReserved1;
  2313.     long                            gReserved2;
  2314.     long                            gReserved3;
  2315.     long                            clientData;
  2316.     RecordIDPtr                        aRecord;                    /*  --> RecordID to which pseudonym is to be added */
  2317.     RStringPtr                        pseudonymName;                /*  --> new name to be added as pseudonym */
  2318.     RStringPtr                        pseudonymType;                /*  --> new name to be added as pseudonym */
  2319.     Boolean                            allowDuplicate;                /*  --> */
  2320.     Boolean                            filler1;
  2321. };
  2322. typedef struct DirAddPseudonymPB DirAddPseudonymPB;
  2323.  
  2324. /*
  2325. DeletePseudonym:
  2326. An alternate name and type for a given record can be deleted.
  2327. */
  2328. struct DirDeletePseudonymPB {
  2329.     Ptr                                qLink;
  2330.     long                            reserved1;
  2331.     long                            reserved2;
  2332.     DirIOCompletionUPP                ioCompletion;
  2333.     OSErr                            ioResult;
  2334.     unsigned long                    saveA5;
  2335.     short                            reqCode;
  2336.     long                            reserved[2];
  2337.     AddrBlock                        serverHint;
  2338.     short                            dsRefNum;
  2339.     unsigned long                    callID;
  2340.     AuthIdentity                    identity;
  2341.     long                            gReserved1;
  2342.     long                            gReserved2;
  2343.     long                            gReserved3;
  2344.     long                            clientData;
  2345.     RecordIDPtr                        aRecord;                    /*  --> RecordID to which pseudonym to be added */
  2346.     RStringPtr                        pseudonymName;                /*  --> pseudonymName to be deleted */
  2347.     RStringPtr                        pseudonymType;                /*  --> pseudonymType to be deleted */
  2348. };
  2349. typedef struct DirDeletePseudonymPB DirDeletePseudonymPB;
  2350.  
  2351. /*
  2352.     AddAlias:
  2353.     This call can be used to create an alias  record. The alias
  2354.     can be created either in the same or different cluster. ADAS will not support
  2355.     this call for this release. A new catalog capability flag 'kSupportsAlias' will indicate
  2356.     if the catalog supports this call. PAB's will support this call. For the PAB implementation,
  2357.     this call will create a record with the name and type specified an aRecord.
  2358.     This call works exactly like AddRecord.
  2359.     If 'allowDuplicate' is false and another record with same name and type already exists
  2360.     'daNoDupAllowed' error will be returned.
  2361. */
  2362. struct DirAddAliasPB {
  2363.     Ptr                                qLink;
  2364.     long                            reserved1;
  2365.     long                            reserved2;
  2366.     DirIOCompletionUPP                ioCompletion;
  2367.     OSErr                            ioResult;
  2368.     unsigned long                    saveA5;
  2369.     short                            reqCode;
  2370.     long                            reserved[2];
  2371.     AddrBlock                        serverHint;
  2372.     short                            dsRefNum;
  2373.     unsigned long                    callID;
  2374.     AuthIdentity                    identity;
  2375.     long                            gReserved1;
  2376.     long                            gReserved2;
  2377.     long                            gReserved3;
  2378.     long                            clientData;
  2379.     RecordIDPtr                        aRecord;                    /*  -> */
  2380.     Boolean                            allowDuplicate;                /*  -> */
  2381.     Boolean                            filler1;
  2382. };
  2383. typedef struct DirAddAliasPB DirAddAliasPB;
  2384.  
  2385. /*
  2386. DirFindValue:
  2387. This call can be used to find the occurrence of a value. The value
  2388. to be matched is passed in the buffer 'matchingData' field. The current
  2389. ADAP/PAB implementation will match a maximum of 32 bytes of data.
  2390. For attribute values in the PAB/ADAP implementation, only the first 32 bytes will
  2391. be used for comparing the occurrence of data. Search can be restricted to
  2392. a particular record and/or attribute type by specifying 'aRecord' or 'aType'.
  2393. After finding one occurrence, 'startingRecord' and 'startingAttribute'
  2394. can be specified to find the next occurrence of the same value.
  2395. 'sortDirection' can be specified with starting values to search forward or backward.
  2396. When a matching value is found, the 'recordFound' indicates the reccordID in which the
  2397. data occurrence was found, 'attributeFound' indicates the attribute with in which the
  2398. matching data was found. ADAP/PAB implementation returns only the type and creationID of
  2399. attributes. Catalogs which don't support creationIDs may return the
  2400. complete value; hence this call may need a buffer to hold the data. For ADAP/PAB implementations
  2401. the user has to make a DirLookup call to get the actual data. 'recordFound' and
  2402. 'attributeFound' can be used to initialize 'startingRecord' and 'startingAttribute' to
  2403. find the next occurrence of the value.
  2404. */
  2405. struct DirFindValuePB {
  2406.     Ptr                                qLink;
  2407.     long                            reserved1;
  2408.     long                            reserved2;
  2409.     DirIOCompletionUPP                ioCompletion;
  2410.     OSErr                            ioResult;
  2411.     unsigned long                    saveA5;
  2412.     short                            reqCode;
  2413.     long                            reserved[2];
  2414.     AddrBlock                        serverHint;
  2415.     short                            dsRefNum;
  2416.     unsigned long                    callID;
  2417.     AuthIdentity                    identity;
  2418.     long                            gReserved1;
  2419.     long                            gReserved2;
  2420.     long                            gReserved3;
  2421.     long                            clientData;
  2422.     PackedRLIPtr                    aRLI;                        /*  --> an RLI specifying the cluster to be enumerated */
  2423.     LocalRecordIDPtr                aRecord;                    /*  --> if not nil, look only in this record */
  2424.     AttributeTypePtr                attrType;                    /*  --> if not nil, look only in this attribute type */
  2425.     LocalRecordIDPtr                startingRecord;                /*  --> record in which to start searching */
  2426.     AttributePtr                    startingAttribute;            /*  --> attribute in which to start searching */
  2427.     LocalRecordIDPtr                recordFound;                /* <--  record in which data was found */
  2428.     Attribute                        attributeFound;                /* <--  attribute in which data was found */
  2429.     unsigned long                    matchSize;                    /*  --> length of matching bytes */
  2430.     Ptr                                matchingData;                /*  --> data bytes to be matched in search */
  2431.     DirSortDirection                sortDirection;                /*  --> sort direction (forwards or backwards) */
  2432. };
  2433. typedef struct DirFindValuePB DirFindValuePB;
  2434.  
  2435. /*
  2436. EnumeratePseudonymGet:
  2437. This call can be used to enumerate the existing pseudonyms for
  2438. a given record specified in 'aRecord'. A starting point can be specified
  2439. by 'startingName' and 'startingType'. If the 'includeStartingPoint' boolean
  2440. is true and a starting point is specified, the name specified by startingName
  2441. and startingType also is returned in the results, if it exists. If this is set to false,
  2442. the pseudonym in startingName and Type is not included.
  2443. Pseudonyms returned in the 'getBuffer' can be extracted by making an
  2444. EnumeratePseudonymParse call. The results will consist of a RecordID with the
  2445. name and type of the pseudonym. If the buffer could not hold all the results, then
  2446. 'kOCEMoreData' error will be returned. The user will be able to continue the call by
  2447. using the last result returned as starting point for the next call.
  2448. */
  2449. struct DirEnumeratePseudonymGetPB {
  2450.     Ptr                                qLink;
  2451.     long                            reserved1;
  2452.     long                            reserved2;
  2453.     DirIOCompletionUPP                ioCompletion;
  2454.     OSErr                            ioResult;
  2455.     unsigned long                    saveA5;
  2456.     short                            reqCode;
  2457.     long                            reserved[2];
  2458.     AddrBlock                        serverHint;
  2459.     short                            dsRefNum;
  2460.     unsigned long                    callID;
  2461.     AuthIdentity                    identity;
  2462.     long                            gReserved1;
  2463.     long                            gReserved2;
  2464.     long                            gReserved3;
  2465.     long                            clientData;
  2466.     RecordIDPtr                        aRecord;                    /*  --> */
  2467.     RStringPtr                        startingName;                /*  --> */
  2468.     RStringPtr                        startingType;                /*  --> */
  2469.     long                            dReserved;                    /*  --  */
  2470.     long                            eReserved;                    /*  --  */
  2471.     long                            fReserved;                    /*  --  */
  2472.     long                            gReserved;                    /*  --  */
  2473.     long                            hReserved;                    /*  --  */
  2474.     Boolean                            includeStartingPoint;        /*  --> if true return the Pseudonym specified by starting point will be included */
  2475.     Byte                            padByte;
  2476.     short                            i1Reserved;                    /*  --  */
  2477.     Ptr                                getBuffer;                    /*  --> */
  2478.     unsigned long                    getBufferSize;                /*  --> */
  2479. };
  2480. typedef struct DirEnumeratePseudonymGetPB DirEnumeratePseudonymGetPB;
  2481.  
  2482. /* The call-back function is defined as follows: */
  2483. typedef pascal Boolean (*ForEachRecordIDProcPtr)(long clientData, const RecordID *recordID);
  2484.  
  2485. #if GENERATINGCFM
  2486. typedef UniversalProcPtr ForEachRecordIDUPP;
  2487. #else
  2488. typedef ForEachRecordIDProcPtr ForEachRecordIDUPP;
  2489. #endif
  2490.  
  2491. typedef ForEachRecordIDUPP ForEachRecordID;
  2492.  
  2493. /*
  2494. EnumeratePseudonymParse:
  2495. The pseudonyms returned in the 'getBuffer' from the EnumeratePseudonymGet call
  2496. can be extracted by using the EnumeratePseudonymParse call. 'eachRecordID'
  2497. will be called for each pseudonym.
  2498.  
  2499. Returning true from any call-back will terminate the EnumeratePseudonymParse call.
  2500.  
  2501. For synchronous calls, the call-back routine actually runs as part of the same thread
  2502. of execution as the thread that made the EnumeratePseudonymParse call.  That means that the
  2503. same low-memory globals, A5, stack, etc. are in effect during the call-back
  2504. that were in effect when the call was made.  Because of this, the call-back
  2505. routine has the same restrictions as the caller of EnumeratePseudonymParse:
  2506. if EnumeratePseudonymParse was not called from interrupt level, then the call-
  2507. back routine can allocate memory. For asynchronous calls, call-back routine is
  2508. like a ioCompletion except that A5 will be preserved for the application.
  2509. */
  2510. struct DirEnumeratePseudonymParsePB {
  2511.     Ptr                                qLink;
  2512.     long                            reserved1;
  2513.     long                            reserved2;
  2514.     DirIOCompletionUPP                ioCompletion;
  2515.     OSErr                            ioResult;
  2516.     unsigned long                    saveA5;
  2517.     short                            reqCode;
  2518.     long                            reserved[2];
  2519.     AddrBlock                        serverHint;
  2520.     short                            dsRefNum;
  2521.     unsigned long                    callID;
  2522.     AuthIdentity                    identity;
  2523.     long                            gReserved1;
  2524.     long                            gReserved2;
  2525.     long                            gReserved3;
  2526.     long                            clientData;
  2527.     RecordIDPtr                        aRecord;                    /*  --> same as DirEnumerateAliasesGetPB */
  2528.     long                            bReserved;                    /*  --  */
  2529.     long                            cReserved;                    /*  --  */
  2530.     ForEachRecordID                    eachRecordID;                /*  --> */
  2531.     long                            eReserved;                    /*  --  */
  2532.     long                            fReserved;                    /*  --  */
  2533.     long                            gReserved;                    /*  --  */
  2534.     long                            hReserved;                    /*  --  */
  2535.     long                            iReserved;                    /*  --  */
  2536.     Ptr                                getBuffer;                    /*  --> */
  2537.     unsigned long                    getBufferSize;                /*  --> */
  2538. };
  2539. typedef struct DirEnumeratePseudonymParsePB DirEnumeratePseudonymParsePB;
  2540.  
  2541. /* GetNameAndType */
  2542. struct DirGetNameAndTypePB {
  2543.     Ptr                                qLink;
  2544.     long                            reserved1;
  2545.     long                            reserved2;
  2546.     DirIOCompletionUPP                ioCompletion;
  2547.     OSErr                            ioResult;
  2548.     unsigned long                    saveA5;
  2549.     short                            reqCode;
  2550.     long                            reserved[2];
  2551.     AddrBlock                        serverHint;
  2552.     short                            dsRefNum;
  2553.     unsigned long                    callID;
  2554.     AuthIdentity                    identity;
  2555.     long                            gReserved1;
  2556.     long                            gReserved2;
  2557.     long                            gReserved3;
  2558.     long                            clientData;
  2559.     RecordIDPtr                        aRecord;                    /*  --> */
  2560. };
  2561. typedef struct DirGetNameAndTypePB DirGetNameAndTypePB;
  2562.  
  2563. /*
  2564. aRecord must contain valid RLI and a CreationID.  It
  2565. must also contain pointers to maximum-length RStrings (name and type fields)
  2566. in which will be returned the record's distinguished name and type.
  2567. */
  2568. /*
  2569. SetNameAndType:
  2570. This call can be used to change a name and type for a record. The record
  2571. to be renamed is specified using 'aRecord'.
  2572. 'newName' and 'newType' indicate the name and type to be set.
  2573. 'allowDuplicate' if true indicates that name is to be set even if another
  2574. name and type exactly matches the newName and newType specified.
  2575.  
  2576. 'newName' and 'newType' are required since the catalogs not supporting
  2577. CreationID require name and type fields in the recordID to identify a given
  2578. record.
  2579. */
  2580. struct DirSetNameAndTypePB {
  2581.     Ptr                                qLink;
  2582.     long                            reserved1;
  2583.     long                            reserved2;
  2584.     DirIOCompletionUPP                ioCompletion;
  2585.     OSErr                            ioResult;
  2586.     unsigned long                    saveA5;
  2587.     short                            reqCode;
  2588.     long                            reserved[2];
  2589.     AddrBlock                        serverHint;
  2590.     short                            dsRefNum;
  2591.     unsigned long                    callID;
  2592.     AuthIdentity                    identity;
  2593.     long                            gReserved1;
  2594.     long                            gReserved2;
  2595.     long                            gReserved3;
  2596.     long                            clientData;
  2597.     RecordIDPtr                        aRecord;                    /*  --> */
  2598.     Boolean                            allowDuplicate;                /*  --> */
  2599.     Byte                            padByte;
  2600.     RStringPtr                        newName;                    /*  --> new name for the record */
  2601.     RStringPtr                        newType;                    /*  --> new type for the record */
  2602. };
  2603. typedef struct DirSetNameAndTypePB DirSetNameAndTypePB;
  2604.  
  2605. /*
  2606. DirGetMetaRecordInfo: This call can be made to obtain
  2607. the MetaRecordInfo for a given record. Information returned
  2608. is 16 bytes of OPAQUE information about the record.
  2609. */
  2610. struct DirGetRecordMetaInfoPB {
  2611.     Ptr                                qLink;
  2612.     long                            reserved1;
  2613.     long                            reserved2;
  2614.     DirIOCompletionUPP                ioCompletion;
  2615.     OSErr                            ioResult;
  2616.     unsigned long                    saveA5;
  2617.     short                            reqCode;
  2618.     long                            reserved[2];
  2619.     AddrBlock                        serverHint;
  2620.     short                            dsRefNum;
  2621.     unsigned long                    callID;
  2622.     AuthIdentity                    identity;
  2623.     long                            gReserved1;
  2624.     long                            gReserved2;
  2625.     long                            gReserved3;
  2626.     long                            clientData;
  2627.     RecordIDPtr                        aRecord;                    /*  --> */
  2628.     DirMetaInfo                        metaInfo;                    /* <--  */
  2629. };
  2630. typedef struct DirGetRecordMetaInfoPB DirGetRecordMetaInfoPB;
  2631.  
  2632. /*
  2633. DirGetDNodeMetaInfo: This call can be made to obtain
  2634. the DNodeMetaInfo for a given Packed RLI. Information returned
  2635. is 16 bytes of OPAQUE information about the DNode.
  2636. */
  2637. struct DirGetDNodeMetaInfoPB {
  2638.     Ptr                                qLink;
  2639.     long                            reserved1;
  2640.     long                            reserved2;
  2641.     DirIOCompletionUPP                ioCompletion;
  2642.     OSErr                            ioResult;
  2643.     unsigned long                    saveA5;
  2644.     short                            reqCode;
  2645.     long                            reserved[2];
  2646.     AddrBlock                        serverHint;
  2647.     short                            dsRefNum;
  2648.     unsigned long                    callID;
  2649.     AuthIdentity                    identity;
  2650.     long                            gReserved1;
  2651.     long                            gReserved2;
  2652.     long                            gReserved3;
  2653.     long                            clientData;
  2654.     PackedRLIPtr                    pRLI;                        /*  --> */
  2655.     DirMetaInfo                        metaInfo;                    /* <--  */
  2656. };
  2657. typedef struct DirGetDNodeMetaInfoPB DirGetDNodeMetaInfoPB;
  2658.  
  2659. /*
  2660. EnumerateDirectoriesGet:
  2661. A user can enumerate all the catalogs installed. This includes installed
  2662. ADAP and CSAM catalogs. The user can specify a signature as input to restrict
  2663. the results. kDirADAPKind will return only ADAP catalogs, kDirDSAMKind
  2664. will return all CSAM catalogs. kDirAllKinds will get both ADAP & CSAM catalogs.
  2665. A specific signature (e.g. X.500) may be used to get catalogs with an X.500 signature.
  2666. The information for each catalog returned will have directoryName, discriminator and features.
  2667.  
  2668. If the user receives 'noErr' or 'kOCEMoreData', the buffer will contain valid results. A user
  2669. can extract the results in the 'getBuffer' by making an DirEnumerateDirectories call.
  2670.  
  2671. If 'kOCEMoreData' is received, the user can continue enumeration by using the last catalog and
  2672. discriminator as startingDirectoryName and staringDirDiscriminator in the next call.
  2673.  
  2674. If 'includeStartingPoint' is true and a starting point is specified,
  2675. the staring point will be returned in the result. If false, it is not included.
  2676. */
  2677. struct DirEnumerateDirectoriesGetPB {
  2678.     Ptr                                qLink;
  2679.     long                            reserved1;
  2680.     long                            reserved2;
  2681.     DirIOCompletionUPP                ioCompletion;
  2682.     OSErr                            ioResult;
  2683.     unsigned long                    saveA5;
  2684.     short                            reqCode;
  2685.     long                            reserved[2];
  2686.     AddrBlock                        serverHint;
  2687.     short                            dsRefNum;
  2688.     unsigned long                    callID;
  2689.     AuthIdentity                    identity;
  2690.     long                            gReserved1;
  2691.     long                            gReserved2;
  2692.     long                            gReserved3;
  2693.     long                            clientData;
  2694.     OCEDirectoryKind                directoryKind;                /*  --> enumerate catalogs bearing this signature */
  2695.     DirectoryNamePtr                startingDirectoryName;        /*  --> staring catalog name */
  2696.     DirDiscriminator                startingDirDiscriminator;    /*  --> staring catalog discriminator */
  2697.     long                            eReserved;                    /*  --  */
  2698.     long                            fReserved;                    /*  --  */
  2699.     long                            gReserved;                    /*  --  */
  2700.     long                            hReserved;                    /*  --  */
  2701.     Boolean                            includeStartingPoint;        /*  --> if true return the catalog specified by starting point */
  2702.     Byte                            padByte;
  2703.     short                            i1Reserved;                    /*  --  */
  2704.     Ptr                                getBuffer;                    /*  --> */
  2705.     unsigned long                    getBufferSize;                /*  --> */
  2706. };
  2707. typedef struct DirEnumerateDirectoriesGetPB DirEnumerateDirectoriesGetPB;
  2708.  
  2709. typedef pascal Boolean (*ForEachDirectoryProcPtr)(long clientData, const DirectoryName *dirName, const DirDiscriminator *discriminator, DirGestalt features);
  2710.  
  2711. #if GENERATINGCFM
  2712. typedef UniversalProcPtr ForEachDirectoryUPP;
  2713. #else
  2714. typedef ForEachDirectoryProcPtr ForEachDirectoryUPP;
  2715. #endif
  2716.  
  2717. typedef ForEachDirectoryUPP ForEachDirectory;
  2718.  
  2719. /*
  2720. EnumerateDirectoriesParse:
  2721. The catalog info returned in 'getBuffer' from the EnumerateDirectoriesGet call
  2722. can be extracted using the EnumerateDirectoriesParse call. 'eachDirectory' will
  2723. be called for each catalog.
  2724.  
  2725. Returning true from any call-back will terminate the EnumerateDirectoriesParse call.
  2726.  
  2727. For synchronous calls, the call-back routine actually runs as part of the same thread
  2728. of execution as the thread that made the EnumerateDirectoriesParse call.  That means that the
  2729. same low-memory globals, A5, stack, etc. are in effect during the call-back
  2730. that were in effect when the call was made.  Because of this, the call-back
  2731. routine has the same restrictions as the caller of EnumerateDirectoriesParse:
  2732. if EnumerateDirectoriesParse was not called from interrupt level, then the call-
  2733. back routine can allocate memory. For asynchronous calls, call-back routine is
  2734. like a ioCompletion except that A5 will be preserved for the application.
  2735.  
  2736. eachDirectory will be called each time to return to the client a
  2737. DirectoryName, DirDiscriminator, and features for that catalog.
  2738. */
  2739. struct DirEnumerateDirectoriesParsePB {
  2740.     Ptr                                qLink;
  2741.     long                            reserved1;
  2742.     long                            reserved2;
  2743.     DirIOCompletionUPP                ioCompletion;
  2744.     OSErr                            ioResult;
  2745.     unsigned long                    saveA5;
  2746.     short                            reqCode;
  2747.     long                            reserved[2];
  2748.     AddrBlock                        serverHint;
  2749.     short                            dsRefNum;
  2750.     unsigned long                    callID;
  2751.     AuthIdentity                    identity;
  2752.     long                            gReserved1;
  2753.     long                            gReserved2;
  2754.     long                            gReserved3;
  2755.     long                            clientData;
  2756.     long                            aReserved;                    /*  --  */
  2757.     long                            bReserved;                    /*  --  */
  2758.     long                            cReserved;                    /*  --  */
  2759.     long                            dReserved;                    /*  --  */
  2760.     ForEachDirectory                eachDirectory;                /*  --> */
  2761.     long                            fReserved;                    /*  --  */
  2762.     long                            gReserved;                    /*  --  */
  2763.     long                            hReserved;                    /*  --  */
  2764.     long                            iReserved;                    /*  --  */
  2765.     Ptr                                getBuffer;                    /*  --> */
  2766.     unsigned long                    getBufferSize;                /*  --> */
  2767. };
  2768. typedef struct DirEnumerateDirectoriesParsePB DirEnumerateDirectoriesParsePB;
  2769.  
  2770. /*
  2771. The Following five call are specific to ADAP Catalogs. Toolbox
  2772. remembers a list of catalogs across boots. If any catalog service
  2773. call is intended for a ADAP catalog, then it must be in the list.
  2774. In order for managing this list, A client (Probably DE will use these
  2775. calls.
  2776. DirAddADAPDirectoryPB: Add a new ADAP catalog to the list.
  2777. DirRemoveADAPDirectory: Remove a ADAP catalog from the list.
  2778. DirNetSearchADAPDirectoriesGet:   search an internet for adas catalogs.
  2779. DirNetSearchADAPDirectoriesParse: extract the results obtained NetSearchADAPDirectoriesGet.
  2780. DirFindADAPDirectoryByNetSearch: Find a specified catalog through net search.
  2781. */
  2782. /*
  2783. NetSearchADAPDirectoriesGet:
  2784. This call can be used to make a network wide search for finding ADAP catalogs.
  2785. This call will be supported only by 'ADAP' and involve highly expensive
  2786. network operations, so the user is advised to use utmost discretion before
  2787. making this call. The results will be collected in the 'getbuffer' and can be
  2788. extracted using NetSearchADAPDirectoriesParse call. The directoryName,
  2789. the directoryDiscriminator, features and serverHint (AppleTalk address for
  2790. a PathFinder serving that catalog) are collected for each catalog found
  2791. on the network. If buffer is too small to hold all the catalogs found on
  2792. the network, a 'kOCEMoreData' error will be returned.
  2793. */
  2794. struct DirNetSearchADAPDirectoriesGetPB {
  2795.     Ptr                                qLink;
  2796.     long                            reserved1;
  2797.     long                            reserved2;
  2798.     DirIOCompletionUPP                ioCompletion;
  2799.     OSErr                            ioResult;
  2800.     unsigned long                    saveA5;
  2801.     short                            reqCode;
  2802.     long                            reserved[2];
  2803.     AddrBlock                        serverHint;
  2804.     short                            dsRefNum;
  2805.     unsigned long                    callID;
  2806.     AuthIdentity                    identity;
  2807.     long                            gReserved1;
  2808.     long                            gReserved2;
  2809.     long                            gReserved3;
  2810.     long                            clientData;
  2811.     Ptr                                getBuffer;                    /*  --> */
  2812.     unsigned long                    getBufferSize;                /*  --> */
  2813.     long                            cReserved;                    /*  --  */
  2814. };
  2815. typedef struct DirNetSearchADAPDirectoriesGetPB DirNetSearchADAPDirectoriesGetPB;
  2816.  
  2817. typedef pascal Boolean (*ForEachADAPDirectoryProcPtr)(long clientData, const DirectoryName *dirName, const DirDiscriminator *discriminator, DirGestalt features, AddrBlock serverHint);
  2818.  
  2819. #if GENERATINGCFM
  2820. typedef UniversalProcPtr ForEachADAPDirectoryUPP;
  2821. #else
  2822. typedef ForEachADAPDirectoryProcPtr ForEachADAPDirectoryUPP;
  2823. #endif
  2824.  
  2825. typedef ForEachADAPDirectoryUPP ForEachADAPDirectory;
  2826.  
  2827. /*
  2828. DirNetSearchADAPDirectoriesParse:
  2829. This call can be used to extract the results obtained in the 'getBuffer'.
  2830. The directoryName, directoryDiscriminator, features and
  2831. serverHint (AppleTalk address for a PathFinder serving that catalog) are
  2832. returned in each call-back. These values may be used to make an
  2833. AddADAPDirectory call.
  2834.  
  2835. Returning TRUE from any call-back will terminate the NetSearchADAPDirectoriesParse request.
  2836.  
  2837. For synchronous calls, the call-back routine actually runs as part of the same thread
  2838. of execution as the thread that made the DirNetSearchADAPDirectoriesParse call. That means that the
  2839. same low-memory globals, A5, stack, etc. are in effect during the call-back
  2840. that were in effect when the call was made.  Because of this, the call-back
  2841. routine has the same restrictions as the caller of DirNetSearchADAPDirectoriesParse:
  2842. if DirNetSearchADAPDirectoriesParse was not called from interrupt level, then the call-
  2843. back routine can allocate memory. For asynchronous calls, call-back routine is
  2844. like a ioCompletion except that A5 will be preserved for the application.
  2845. */
  2846. struct DirNetSearchADAPDirectoriesParsePB {
  2847.     Ptr                                qLink;
  2848.     long                            reserved1;
  2849.     long                            reserved2;
  2850.     DirIOCompletionUPP                ioCompletion;
  2851.     OSErr                            ioResult;
  2852.     unsigned long                    saveA5;
  2853.     short                            reqCode;
  2854.     long                            reserved[2];
  2855.     AddrBlock                        serverHint;
  2856.     short                            dsRefNum;
  2857.     unsigned long                    callID;
  2858.     AuthIdentity                    identity;
  2859.     long                            gReserved1;
  2860.     long                            gReserved2;
  2861.     long                            gReserved3;
  2862.     long                            clientData;
  2863.     Ptr                                getBuffer;                    /*  --> */
  2864.     unsigned long                    getBufferSize;                /*  --> */
  2865.     ForEachADAPDirectory            eachADAPDirectory;            /*  --> */
  2866. };
  2867. typedef struct DirNetSearchADAPDirectoriesParsePB DirNetSearchADAPDirectoriesParsePB;
  2868.  
  2869. /*
  2870. DirFindADAPDirectoryByNetSearch:
  2871. This call can be used to make a network wide search to find an ADAP catalog.
  2872. This call will be supported only by 'ADAP' and involves highly expensive
  2873. network operations, so the user is advised to use utmost discretion before
  2874. making this call. The catalog is specified using directoryName and discriminator.
  2875. If 'addToOCESetup' is true, the catalog will be automatically added to the setup
  2876. list and will be visible through the EnumerateDirectories call and also
  2877. also a creationID to the directoryRecord will be returned.
  2878. If this parameter is set to 'false', the catalog will be added to temporary list
  2879. and will be available for making other catalog service calls. The catalogs
  2880. which are not in the preference catalog list will not be visible through the
  2881. EnumerateDirectories call.
  2882. */
  2883. struct DirFindADAPDirectoryByNetSearchPB {
  2884.     Ptr                                qLink;
  2885.     long                            reserved1;
  2886.     long                            reserved2;
  2887.     DirIOCompletionUPP                ioCompletion;
  2888.     OSErr                            ioResult;
  2889.     unsigned long                    saveA5;
  2890.     short                            reqCode;
  2891.     long                            reserved[2];
  2892.     AddrBlock                        serverHint;
  2893.     short                            dsRefNum;
  2894.     unsigned long                    callID;
  2895.     AuthIdentity                    identity;
  2896.     long                            gReserved1;
  2897.     long                            gReserved2;
  2898.     long                            gReserved3;
  2899.     long                            clientData;
  2900.     DirectoryNamePtr                directoryName;                /*  --> catalog name */
  2901.     DirDiscriminator                discriminator;                /*  --> discriminate between dup catalog names */
  2902.     Boolean                            addToOCESetup;                /*  --> add this catalog to OCE Setup List */
  2903.     Byte                            padByte;
  2904.     CreationID                        directoryRecordCID;            /* <--  creationID for the catalog record */
  2905. };
  2906. typedef struct DirFindADAPDirectoryByNetSearchPB DirFindADAPDirectoryByNetSearchPB;
  2907.  
  2908. /*
  2909. DirAddADAPDirectory:
  2910. The catalog specified by 'directoryName' and 'discriminator' will be
  2911. added to the list of catalogs maintained by the Toolbox. Once added,
  2912. the catalog is available across boots, until the catalog is removed
  2913. explicitly through a DirRemoveADAPDirectory call.
  2914. If 'serverHint' is not nil, the address provided will be used
  2915. to contact a PathFinder for the catalog specified.
  2916. If 'serverHint' is nil or does not point to a valid PathFinder server
  2917. for that catalog, this call will fail.
  2918. If 'addToOCESetup' is true, the catalog will be automatically added to the setup
  2919. catalog list and will be visible through EnumerateDirectories calls and
  2920. also a creationID to the directoryRecord will be returned.
  2921. If this parameter is set to 'false', catalog will be added to temprary list
  2922. and will be available for making other catalog service calls. The catalogs
  2923. which are not in the setup  list will not be visible through
  2924. EnumerateDirectories call.
  2925. */
  2926. struct DirAddADAPDirectoryPB {
  2927.     Ptr                                qLink;
  2928.     long                            reserved1;
  2929.     long                            reserved2;
  2930.     DirIOCompletionUPP                ioCompletion;
  2931.     OSErr                            ioResult;
  2932.     unsigned long                    saveA5;
  2933.     short                            reqCode;
  2934.     long                            reserved[2];
  2935.     AddrBlock                        serverHint;
  2936.     short                            dsRefNum;
  2937.     unsigned long                    callID;
  2938.     AuthIdentity                    identity;
  2939.     long                            gReserved1;
  2940.     long                            gReserved2;
  2941.     long                            gReserved3;
  2942.     long                            clientData;
  2943.     DirectoryNamePtr                directoryName;                /*  --> catalog name */
  2944.     DirDiscriminator                discriminator;                /*  --> discriminate between dup catalog names */
  2945.     Boolean                            addToOCESetup;                /*  --> add this catalog to OCE Setup */
  2946.     Byte                            padByte;
  2947.     CreationID                        directoryRecordCID;            /* <--  creationID for the catalog record */
  2948. };
  2949. typedef struct DirAddADAPDirectoryPB DirAddADAPDirectoryPB;
  2950.  
  2951. /*
  2952. GetDirectoryInfo:
  2953. DirGetDirectoryInfo will do:
  2954.  
  2955. If a 'dsRefNum' is non-Zero, the catalog information for
  2956.     the corresponding  PAB will be  returned.
  2957.  If 'dsRefNum' is zero and 'serverHint' is non-zero, If the
  2958.  'serverHint' points to a valid ADAP Catalog Server(Path Finder),
  2959.  the catalog information (i.e. directoryName, discriminator, features)
  2960.  for that catalog will be returned.
  2961.     If a  valid catalog name and discriminator are provided
  2962.     features (Set of capability flags) for that catalog will be returned.
  2963. */
  2964. struct DirGetDirectoryInfoPB {
  2965.     Ptr                                qLink;
  2966.     long                            reserved1;
  2967.     long                            reserved2;
  2968.     DirIOCompletionUPP                ioCompletion;
  2969.     OSErr                            ioResult;
  2970.     unsigned long                    saveA5;
  2971.     short                            reqCode;
  2972.     long                            reserved[2];
  2973.     AddrBlock                        serverHint;
  2974.     short                            dsRefNum;
  2975.     unsigned long                    callID;
  2976.     AuthIdentity                    identity;
  2977.     long                            gReserved1;
  2978.     long                            gReserved2;
  2979.     long                            gReserved3;
  2980.     long                            clientData;
  2981.     DirectoryNamePtr                directoryName;                /*  --> catalog name */
  2982.     DirDiscriminator                discriminator;                /* <--> descriminate between dup catalog names */
  2983.     DirGestalt                        features;                    /* <--  capability bit flags */
  2984. };
  2985. typedef struct DirGetDirectoryInfoPB DirGetDirectoryInfoPB;
  2986.  
  2987. /*
  2988.  * Note on Access Controls:
  2989.  * Access control is based on a list model.
  2990.  * You can get access controls list which gives dsObject and accMask for each dsObject.
  2991.  * GetAccessControl can be limited to currently supplied identity by setting forCurrentUserOnly.
  2992.  * There are special DSObjects are defined in ADASTypes.h for each of the category
  2993.  * supported in ADAS Catalogs. (kOwner, kFriends, kAuthenticatedToCluster, 
  2994.  * kAuthenticatedToDirectory, kGuest) and DUGetActlDSSpec call can be used
  2995.  * to obtain appropraiate DSSpec before making set calls to ADAS catalogs.
  2996.  *
  2997.  */
  2998. /*
  2999.     GetDNodeAccessControlGet:
  3000.     This call can be done to get back access control list for a DNode.
  3001.     pRLI -> RLI of the DNode whose access control list is sought
  3002.     curUserAccMask -> If this is 'true', Access controls for the user specified by
  3003.                       the identity parameter will be returned other wise entire list
  3004.                       will be returned.
  3005.     startingDsObj  -> If this is not nil, list should be started after this object.
  3006.     startingPointInclusive -> If staringDsObj is specified, include that in the returned
  3007.                               results.
  3008.                               
  3009.     The results will be collected in the 'getBuffer' supplied by the user.
  3010.     If buffer can not hold all the data returned 'daMoreData' error will be returned.
  3011.      
  3012.     If user receives 'noErr' or 'daMoreData', buffer will contain valid results. A user
  3013.     can extract the results in the 'getBuffer' by making 'DsGetDNodeAccessControlParse' call.
  3014.     
  3015.     Results returned for each DSObject will contain DSSpecPtr and three sets of access mask. 
  3016.  
  3017. */
  3018. struct DirGetDNodeAccessControlGetPB {
  3019.     Ptr                                qLink;
  3020.     long                            reserved1;
  3021.     long                            reserved2;
  3022.     DirIOCompletionUPP                ioCompletion;
  3023.     OSErr                            ioResult;
  3024.     unsigned long                    saveA5;
  3025.     short                            reqCode;
  3026.     long                            reserved[2];
  3027.     AddrBlock                        serverHint;
  3028.     short                            dsRefNum;
  3029.     unsigned long                    callID;
  3030.     AuthIdentity                    identity;
  3031.     long                            gReserved1;
  3032.     long                            gReserved2;
  3033.     long                            gReserved3;
  3034.     long                            clientData;
  3035.     PackedRLIPtr                    pRLI;                        /*  -> RLI of the cluster whose access control list is sought  */
  3036.     long                            bReserved;                    /*  -- unused */
  3037.     long                            cReserved;                    /*  -- unused */
  3038.     long                            dReserved;                    /*  -- unused */
  3039.     long                            eResreved;                    /* --> */
  3040.     Boolean                            forCurrentUserOnly;            /* -->  */
  3041.     Boolean                            filler1;
  3042.     DSSpec                            *startingPoint;                /* --> starting Point */
  3043.     Boolean                            includeStartingPoint;        /*  -> if true return the DsObject 
  3044.                                                                 specified in starting point */
  3045.     Boolean                            filler2;
  3046.     Ptr                                getBuffer;                    /*    -> */
  3047.     unsigned long                    getBufferSize;                /*  -> */
  3048. };
  3049. typedef struct DirGetDNodeAccessControlGetPB DirGetDNodeAccessControlGetPB;
  3050.  
  3051. /* The Access Control call-back function is defined as follows: */
  3052. typedef pascal Boolean (*ForEachDNodeAccessControlProcPtr)(long clientData, const DSSpec *dsObj, AccessMask activeDnodeAccMask, AccessMask defaultRecordAccMask, AccessMask defaultAttributeAccMask);
  3053.  
  3054. #if GENERATINGCFM
  3055. typedef UniversalProcPtr ForEachDNodeAccessControlUPP;
  3056. #else
  3057. typedef ForEachDNodeAccessControlProcPtr ForEachDNodeAccessControlUPP;
  3058. #endif
  3059.  
  3060. typedef ForEachDNodeAccessControlUPP ForEachDNodeAccessControl;
  3061.  
  3062. /*
  3063.     GetDNodeAccessControlParse:
  3064.     After an GetDNodeAccessControlGet call has completed, 
  3065.     call GetDNodeAccessControlParse to parse through the buffer that
  3066.     that was filled in GetDNodeAccessControlGet.
  3067.     
  3068.     'eachObject' will be called each time to return to the client a
  3069.     DsObject and a set of three accMasks (three long words) for that object.
  3070.     Acceesmasks returned apply to the dsObject in the callback :
  3071.     1. Currently Active Access mask for the specified DNode.
  3072.     2. Default Access mask for any Record in the DNode
  3073.     3. Default Access mask for any Attribute in the DNode
  3074.     The clientData parameter that you pass in the parameter block will be passed
  3075.     to 'eachObject'.  You are free to put anything in clientData - it is intended
  3076.     to allow you some way to match the call-back to the original call (for
  3077.     example, you make more then one aysynchronous GetDNodeAccessControlGet calls and you want to
  3078.     associate returned results in some way).
  3079.     
  3080.     The client should return FALSE from 'eachObject' to continue
  3081.     processing of the GetDNodeAccessControlParse request.  Returning TRUE will
  3082.     terminate the GetDNodeAccessControlParse request.
  3083.  
  3084.     For synchronous calls, the call-back routine actually runs as part of the same thread 
  3085.     of execution as the thread that made the GetDNodeAccessControlParse call.  That means that the
  3086.     same low-memory globals, A5, stack, etc. are in effect during the call-back
  3087.     that were in effect when the call was made.  Because of this, the call-back
  3088.     routine has the same restrictions as the caller of GetDNodeAccessControlParse:
  3089.     if GetDNodeAccessControlParse was not called from interrupt level, then the call-
  3090.     back routine can allocate memory. For asynchronous calls, call-back routine is
  3091.     like a ioCompletion except that A5 will be preserved for the application.
  3092.  
  3093.  
  3094. */
  3095. struct DirGetDNodeAccessControlParsePB {
  3096.     Ptr                                qLink;
  3097.     long                            reserved1;
  3098.     long                            reserved2;
  3099.     DirIOCompletionUPP                ioCompletion;
  3100.     OSErr                            ioResult;
  3101.     unsigned long                    saveA5;
  3102.     short                            reqCode;
  3103.     long                            reserved[2];
  3104.     AddrBlock                        serverHint;
  3105.     short                            dsRefNum;
  3106.     unsigned long                    callID;
  3107.     AuthIdentity                    identity;
  3108.     long                            gReserved1;
  3109.     long                            gReserved2;
  3110.     long                            gReserved3;
  3111.     long                            clientData;
  3112.     PackedRLIPtr                    pRLI;                        /*  -> RLI of the cluster  */
  3113.     long                            bReserved;                    /*  -- unused */
  3114.     long                            cReserved;                    /*  -- unused */
  3115.     long                            dReserved;                    /*  -- unused */
  3116.     ForEachDNodeAccessControl        eachObject;                    /* --> */
  3117.     Boolean                            forCurrentUserOnly;            /* -->  */
  3118.     Boolean                            filler1;
  3119.     DSSpec                            *startingPoint;                /* --> starting Point */
  3120.     Boolean                            includeStartingPoint;        /*  -> if true return the record 
  3121.                                                         specified in starting point */
  3122.     Boolean                            filler2;
  3123.     Ptr                                getBuffer;                    /*    -> */
  3124.     unsigned long                    getBufferSize;                /*  -> */
  3125. };
  3126. typedef struct DirGetDNodeAccessControlParsePB DirGetDNodeAccessControlParsePB;
  3127.  
  3128. /*
  3129.     GetRecordAccessControlGet:
  3130.     This call can be done to get back access control list for a RecordID.
  3131.     aRecord -> RecordID to which access control list is sought
  3132.     curUserAccMask -> If this is 'true', Access controls for the user specified by
  3133.                       the identity parameter will be returned other wise entire list
  3134.                       will be returned.
  3135.     startingDsObj  -> If this is not nil, list should be started after this object.
  3136.     startingPointInclusive -> If staringDsObj is specified, include that in the returned
  3137.                               results.
  3138.                               
  3139.     The results will be collected in the 'getBuffer' supplied by the user.
  3140.     If buffer can not hold all the data returned 'daMoreData' error will be returned.
  3141.      
  3142.     If user receives 'noErr' or 'daMoreData', buffer will contain valid results. A user
  3143.     can extract the results in the 'getBuffer' by making 'DsGetDNodeAccessControlParse' call.
  3144.     
  3145.     Results returned for each DSObject will contain DSSpecPtr and accMask. 
  3146.  
  3147. */
  3148. struct DirGetRecordAccessControlGetPB {
  3149.     Ptr                                qLink;
  3150.     long                            reserved1;
  3151.     long                            reserved2;
  3152.     DirIOCompletionUPP                ioCompletion;
  3153.     OSErr                            ioResult;
  3154.     unsigned long                    saveA5;
  3155.     short                            reqCode;
  3156.     long                            reserved[2];
  3157.     AddrBlock                        serverHint;
  3158.     short                            dsRefNum;
  3159.     unsigned long                    callID;
  3160.     AuthIdentity                    identity;
  3161.     long                            gReserved1;
  3162.     long                            gReserved2;
  3163.     long                            gReserved3;
  3164.     long                            clientData;
  3165.     RecordIDPtr                        aRecord;                    /*  -> RecordID to which access control list is sought list is sought  */
  3166.     long                            bReserved;                    /*  -- unused */
  3167.     long                            cReserved;                    /*  -- unused */
  3168.     long                            dReserved;                    /*  -- unused */
  3169.     long                            eResreved;                    /* --> */
  3170.     Boolean                            forCurrentUserOnly;            /* -->  */
  3171.     Boolean                            filler1;
  3172.     DSSpec                            *startingPoint;                /* --> starting Point */
  3173.     Boolean                            includeStartingPoint;        /*  -> if true return the DsObject 
  3174.                                                                 specified in starting point */
  3175.     Boolean                            filler2;
  3176.     Ptr                                getBuffer;                    /*    -> */
  3177.     unsigned long                    getBufferSize;                /*  -> */
  3178. };
  3179. typedef struct DirGetRecordAccessControlGetPB DirGetRecordAccessControlGetPB;
  3180.  
  3181. /* The Access Control call-back function is defined as follows: */
  3182. typedef pascal Boolean (*ForEachRecordAccessControlProcPtr)(long clientData, const DSSpec *dsObj, AccessMask activeDnodeAccMask, AccessMask activeRecordAccMask, AccessMask defaultAttributeAccMask);
  3183.  
  3184. #if GENERATINGCFM
  3185. typedef UniversalProcPtr ForEachRecordAccessControlUPP;
  3186. #else
  3187. typedef ForEachRecordAccessControlProcPtr ForEachRecordAccessControlUPP;
  3188. #endif
  3189.  
  3190. typedef ForEachRecordAccessControlUPP ForEachRecordAccessControl;
  3191.  
  3192. /*
  3193.     GetRecordAccessControlParse:
  3194.     After an GetRecordAccessControlGet call has completed, 
  3195.     call GetRecordAccessControlParse to parse through the buffer that
  3196.     that was filled in GetRecordAccessControlGet.
  3197.     
  3198.     'eachObject' will be called each time to return to the client a
  3199.     DsObject and a set of three accMasks (three long words) for that object.
  3200.     Acceesmasks returned apply to the dsObject in the callback :
  3201.     1. Active Access mask for the DNode Containing the Record.
  3202.     2. Active Access mask for the Record specified.
  3203.     3. Defualt Access mask for Attributes in the record.
  3204.     The clientData parameter that you pass in the parameter block will be passed
  3205.     to 'eachObject'.  You are free to put anything in clientData - it is intended
  3206.     to allow you some way to match the call-back to the original call (for
  3207.     example, you make more then one aysynchronous GetRecordAccessControlGet calls and you want to
  3208.     associate returned results in some way).
  3209.     
  3210.     The client should return FALSE from 'eachObject' to continue
  3211.     processing of the GetRecordAccessControlParse request.  Returning TRUE will
  3212.     terminate the GetRecordAccessControlParse request.
  3213.  
  3214.     For synchronous calls, the call-back routine actually runs as part of the same thread 
  3215.     of execution as the thread that made the GetRecordAccessControlParse call.  That means that the
  3216.     same low-memory globals, A5, stack, etc. are in effect during the call-back
  3217.     that were in effect when the call was made.  Because of this, the call-back
  3218.     routine has the same restrictions as the caller of GetRecordAccessControlParse:
  3219.     if GetRecordAccessControlParse was not called from interrupt level, then the call-
  3220.     back routine can allocate memory. For asynchronous calls, call-back routine is
  3221.     like a ioCompletion except that A5 will be preserved for the application.
  3222.  
  3223.  
  3224. */
  3225. struct DirGetRecordAccessControlParsePB {
  3226.     Ptr                                qLink;
  3227.     long                            reserved1;
  3228.     long                            reserved2;
  3229.     DirIOCompletionUPP                ioCompletion;
  3230.     OSErr                            ioResult;
  3231.     unsigned long                    saveA5;
  3232.     short                            reqCode;
  3233.     long                            reserved[2];
  3234.     AddrBlock                        serverHint;
  3235.     short                            dsRefNum;
  3236.     unsigned long                    callID;
  3237.     AuthIdentity                    identity;
  3238.     long                            gReserved1;
  3239.     long                            gReserved2;
  3240.     long                            gReserved3;
  3241.     long                            clientData;
  3242.     RecordIDPtr                        aRecord;                    /*  -> RecordID to which access control list is sought list is sought  */
  3243.     long                            bReserved;                    /*  -- unused */
  3244.     long                            cReserved;                    /*  -- unused */
  3245.     long                            dReserved;                    /*  -- unused */
  3246.     ForEachRecordAccessControl        eachObject;                    /* --> */
  3247.     Boolean                            forCurrentUserOnly;            /* -->  */
  3248.     Boolean                            filler1;
  3249.     DSSpec                            *startingPoint;                /* --> starting Point */
  3250.     Boolean                            includeStartingPoint;        /*  -> if true return the record 
  3251.                                                         specified in starting point */
  3252.     Boolean                            filler2;
  3253.     Ptr                                getBuffer;                    /*    -> */
  3254.     unsigned long                    getBufferSize;                /*  -> */
  3255. };
  3256. typedef struct DirGetRecordAccessControlParsePB DirGetRecordAccessControlParsePB;
  3257.  
  3258. /*
  3259.     GetAttributeAccessControlGet:
  3260.     This call can be done to get back access control list for a attributeType with in a RecordID.
  3261.     aRecord -> RecordID to which access control list is sought
  3262.     aType    -> Attribute Type to which access controls are sought
  3263.     curUserAccMask -> If this is 'true', Access controls for the user specified by
  3264.                       the identity parameter will be returned other wise entire list
  3265.                       will be returned.
  3266.     startingDsObj  -> If this is not nil, list should be started after this object.
  3267.     startingPointInclusive -> If staringDsObj is specified, include that in the returned
  3268.                               results.
  3269.                               
  3270.     The results will be collected in the 'getBuffer' supplied by the user.
  3271.     If buffer can not hold all the data returned 'daMoreData' error will be returned.
  3272.      
  3273.     If user receives 'noErr' or 'daMoreData', buffer will contain valid results. A user
  3274.     can extract the results in the 'getBuffer' by making 'DsGetDNodeAccessControlParse' call.
  3275.     
  3276.     Results returned for each DSObject will contain DSSpecPtr and accMask. 
  3277.  
  3278. */
  3279. struct DirGetAttributeAccessControlGetPB {
  3280.     Ptr                                qLink;
  3281.     long                            reserved1;
  3282.     long                            reserved2;
  3283.     DirIOCompletionUPP                ioCompletion;
  3284.     OSErr                            ioResult;
  3285.     unsigned long                    saveA5;
  3286.     short                            reqCode;
  3287.     long                            reserved[2];
  3288.     AddrBlock                        serverHint;
  3289.     short                            dsRefNum;
  3290.     unsigned long                    callID;
  3291.     AuthIdentity                    identity;
  3292.     long                            gReserved1;
  3293.     long                            gReserved2;
  3294.     long                            gReserved3;
  3295.     long                            clientData;
  3296.     RecordIDPtr                        aRecord;                    /*  -> RecordID to which access control list is sought list is sought  */
  3297.     AttributeTypePtr                aType;                        /*  -> Attribute Type to which access controls are sought          */
  3298.     long                            cReserved;                    /*  -- unused */
  3299.     long                            dReserved;                    /*  -- unused */
  3300.     long                            eResreved;                    /* --> */
  3301.     Boolean                            forCurrentUserOnly;            /* -->  */
  3302.     Boolean                            filler1;
  3303.     DSSpec                            *startingPoint;                /* --> starting Point */
  3304.     Boolean                            includeStartingPoint;        /*  -> if true return the DsObject 
  3305.                                                                 specified in starting point */
  3306.     Boolean                            filler2;
  3307.     Ptr                                getBuffer;                    /*    -> */
  3308.     unsigned long                    getBufferSize;                /*  -> */
  3309. };
  3310. typedef struct DirGetAttributeAccessControlGetPB DirGetAttributeAccessControlGetPB;
  3311.  
  3312. /* The Access Control call-back function is defined as follows: */
  3313. typedef pascal Boolean (*ForEachAttributeAccessControlProcPtr)(long clientData, const DSSpec *dsObj, AccessMask activeDnodeAccMask, AccessMask activeRecordAccMask, AccessMask activeAttributeAccMask);
  3314.  
  3315. #if GENERATINGCFM
  3316. typedef UniversalProcPtr ForEachAttributeAccessControlUPP;
  3317. #else
  3318. typedef ForEachAttributeAccessControlProcPtr ForEachAttributeAccessControlUPP;
  3319. #endif
  3320.  
  3321. typedef ForEachAttributeAccessControlUPP ForEachAttributeAccessControl;
  3322.  
  3323. /*
  3324.     GetAttributeAccessControlParse:
  3325.     After an GetAttributeAccessControlGet call has completed, 
  3326.     call GetAttributeAccessControlParse to parse through the buffer that
  3327.     that was filled in GetAttributeAccessControlGet.
  3328.     
  3329.     'eachObject' will be called each time to return to the client a
  3330.     DsObject and a set of three accMasks (three long words) for that object.
  3331.     Acceesmasks returned apply to the dsObject in the callback :
  3332.     1. Active Access mask for the DNode Containing the Attribute.
  3333.     2. Active Access mask for the Record in the Containing the Attribute.
  3334.     3. Active Access mask for the specified Attribute.
  3335.     The clientData parameter that you pass in the parameter block will be passed
  3336.     to 'eachObject'.  You are free to put anything in clientData - it is intended
  3337.     to allow you some way to match the call-back to the original call (for
  3338.     example, you make more then one aysynchronous GetAttributeAccessControlGet calls and you want to
  3339.     associate returned results in some way).
  3340.     
  3341.     The client should return FALSE from 'eachObject' to continue
  3342.     processing of the GetAttributeAccessControlParse request.  Returning TRUE will
  3343.     terminate the GetAttributeAccessControlParse request.
  3344.  
  3345.     For synchronous calls, the call-back routine actually runs as part of the same thread 
  3346.     of execution as the thread that made the GetAttributeAccessControlParse call.  That means that the
  3347.     same low-memory globals, A5, stack, etc. are in effect during the call-back
  3348.     that were in effect when the call was made.  Because of this, the call-back
  3349.     routine has the same restrictions as the caller of GetAttributeAccessControlParse:
  3350.     if GetAttributeAccessControlParse was not called from interrupt level, then the call-
  3351.     back routine can allocate memory. For asynchronous calls, call-back routine is
  3352.     like a ioCompletion except that A5 will be preserved for the application.
  3353.  
  3354.  
  3355. */
  3356. struct DirGetAttributeAccessControlParsePB {
  3357.     Ptr                                qLink;
  3358.     long                            reserved1;
  3359.     long                            reserved2;
  3360.     DirIOCompletionUPP                ioCompletion;
  3361.     OSErr                            ioResult;
  3362.     unsigned long                    saveA5;
  3363.     short                            reqCode;
  3364.     long                            reserved[2];
  3365.     AddrBlock                        serverHint;
  3366.     short                            dsRefNum;
  3367.     unsigned long                    callID;
  3368.     AuthIdentity                    identity;
  3369.     long                            gReserved1;
  3370.     long                            gReserved2;
  3371.     long                            gReserved3;
  3372.     long                            clientData;
  3373.     RecordIDPtr                        aRecord;                    /*  -> RecordID to which access control list is sought list is sought  */
  3374.     AttributeTypePtr                aType;                        /*  -> Attribute Type to which access controls are sought          */
  3375.     long                            cReserved;                    /*  -- unused */
  3376.     long                            dReserved;                    /*  -- unused */
  3377.     ForEachAttributeAccessControl    eachObject;                    /* --> */
  3378.     Boolean                            forCurrentUserOnly;            /* -->  */
  3379.     Boolean                            filler1;
  3380.     DSSpec                            *startingPoint;                /* --> starting Point */
  3381.     Boolean                            includeStartingPoint;        /*  -> if true return the record 
  3382.                                                         specified in starting point */
  3383.     Boolean                            filler2;
  3384.     Ptr                                getBuffer;                    /*    -> */
  3385.     unsigned long                    getBufferSize;                /*  -> */
  3386. };
  3387. typedef struct DirGetAttributeAccessControlParsePB DirGetAttributeAccessControlParsePB;
  3388.  
  3389. /*
  3390. MapPathNameToDNodeNumber:
  3391. This call maps a given PathName within a catalog to its DNodeNumber.
  3392. */
  3393. struct DirMapPathNameToDNodeNumberPB {
  3394.     Ptr                                qLink;
  3395.     long                            reserved1;
  3396.     long                            reserved2;
  3397.     DirIOCompletionUPP                ioCompletion;
  3398.     OSErr                            ioResult;
  3399.     unsigned long                    saveA5;
  3400.     short                            reqCode;
  3401.     long                            reserved[2];
  3402.     AddrBlock                        serverHint;
  3403.     short                            dsRefNum;
  3404.     unsigned long                    callID;
  3405.     AuthIdentity                    identity;
  3406.     long                            gReserved1;
  3407.     long                            gReserved2;
  3408.     long                            gReserved3;
  3409.     long                            clientData;
  3410.     DirectoryNamePtr                directoryName;                /*  --> catalog name */
  3411.     DirDiscriminator                discriminator;                /*  --> discriminator */
  3412.     DNodeNum                        dNodeNumber;                /* <--  dNodenumber to the path */
  3413.     PackedPathNamePtr                path;                        /*  --> Path Name to be mapped */
  3414. };
  3415. typedef struct DirMapPathNameToDNodeNumberPB DirMapPathNameToDNodeNumberPB;
  3416.  
  3417. /*
  3418. PathName in the path field will be mapped to the cooresponding dNodeNumber and
  3419. returned in the DNodeNumber field. directoryName and descriminator Fields are
  3420. ignored. DSRefNum is used to identify the catalog.
  3421. */
  3422. /*
  3423. MapDNodeNumberToPathName:
  3424. This call will map a given DNodeNumber with in a catalog to the
  3425. corresponding PathName.
  3426. */
  3427. struct DirMapDNodeNumberToPathNamePB {
  3428.     Ptr                                qLink;
  3429.     long                            reserved1;
  3430.     long                            reserved2;
  3431.     DirIOCompletionUPP                ioCompletion;
  3432.     OSErr                            ioResult;
  3433.     unsigned long                    saveA5;
  3434.     short                            reqCode;
  3435.     long                            reserved[2];
  3436.     AddrBlock                        serverHint;
  3437.     short                            dsRefNum;
  3438.     unsigned long                    callID;
  3439.     AuthIdentity                    identity;
  3440.     long                            gReserved1;
  3441.     long                            gReserved2;
  3442.     long                            gReserved3;
  3443.     long                            clientData;
  3444.     DirectoryNamePtr                directoryName;                /*  --> catalog name */
  3445.     DirDiscriminator                discriminator;                /*  --> discriminator */
  3446.     DNodeNum                        dNodeNumber;                /*  --> dNodenumber to be mapped */
  3447.     PackedPathNamePtr                path;                        /* <--  Packed Path Name returned */
  3448.     unsigned short                    lengthOfPathName;            /*  --> length of packed pathName structure*/
  3449. };
  3450. typedef struct DirMapDNodeNumberToPathNamePB DirMapDNodeNumberToPathNamePB;
  3451.  
  3452. /*
  3453. dNodeNumber in the DNodeNumber field will be mapped to the cooresponding
  3454. pathName and returned in the PackedPathName field.
  3455. lengthOfPathName is to be set the length of pathName structure.
  3456. If length of PackedPathName is larger then the lengthOfPathName, kOCEMoreData
  3457. OSErr will be returned.
  3458. */
  3459. /*
  3460. GetLocalNetworkSpec:
  3461. This call will return the Local NetworkSpec. Client should supply
  3462. an RString big enough to hold the NetworkSpec.
  3463. */
  3464. struct DirGetLocalNetworkSpecPB {
  3465.     Ptr                                qLink;
  3466.     long                            reserved1;
  3467.     long                            reserved2;
  3468.     DirIOCompletionUPP                ioCompletion;
  3469.     OSErr                            ioResult;
  3470.     unsigned long                    saveA5;
  3471.     short                            reqCode;
  3472.     long                            reserved[2];
  3473.     AddrBlock                        serverHint;
  3474.     short                            dsRefNum;
  3475.     unsigned long                    callID;
  3476.     AuthIdentity                    identity;
  3477.     long                            gReserved1;
  3478.     long                            gReserved2;
  3479.     long                            gReserved3;
  3480.     long                            clientData;
  3481.     DirectoryNamePtr                directoryName;                /*  --> catalog name */
  3482.     DirDiscriminator                discriminator;                /*  --> discriminator */
  3483.     NetworkSpecPtr                    networkSpec;                /* <--  NetworkSpec */
  3484. };
  3485. typedef struct DirGetLocalNetworkSpecPB DirGetLocalNetworkSpecPB;
  3486.  
  3487. /*
  3488. PathName in the path field must be set to nil. internetName should be large
  3489. enough to hold the internetName. InterNetname returned indicates path finder's
  3490. local internet (configured by administrator).
  3491. */
  3492. /*
  3493. GetDNodeInfo:
  3494. This call will return the information (internetName and descriptor)
  3495. for the given RLI of a DNode.
  3496. */
  3497. struct DirGetDNodeInfoPB {
  3498.     Ptr                                qLink;
  3499.     long                            reserved1;
  3500.     long                            reserved2;
  3501.     DirIOCompletionUPP                ioCompletion;
  3502.     OSErr                            ioResult;
  3503.     unsigned long                    saveA5;
  3504.     short                            reqCode;
  3505.     long                            reserved[2];
  3506.     AddrBlock                        serverHint;
  3507.     short                            dsRefNum;
  3508.     unsigned long                    callID;
  3509.     AuthIdentity                    identity;
  3510.     long                            gReserved1;
  3511.     long                            gReserved2;
  3512.     long                            gReserved3;
  3513.     long                            clientData;
  3514.     PackedRLIPtr                    pRLI;                        /*  --> packed RLI whose info is requested */
  3515.     DirNodeKind                        descriptor;                    /* <--  dNode descriptor */
  3516.     NetworkSpecPtr                    networkSpec;                /* <--  cluster's networkSpec if kIsCluster */
  3517. };
  3518. typedef struct DirGetDNodeInfoPB DirGetDNodeInfoPB;
  3519.  
  3520. /*
  3521. If DnodeNumber is set to a non zero value, path should be set to nil.
  3522. if DnodeNumber is set to zero, pathName should point to a packed path name.
  3523. internetName should be large enough to hold
  3524. the internetName. (If the internetName is same as the one got by
  3525. GetLocalInternetName call, it indicates cluster is reachable  without
  3526. forwarders, --> Tell me if I am wrong)
  3527. */
  3528. /*
  3529. DirCreatePersonalDirectory:
  3530. A new  personal catalog can be created by specifying an FSSpec for
  3531. the file. If a file already exists dupFNErr will be returned. This call is
  3532. supported 'synchronous' mode only.
  3533. */
  3534. struct DirCreatePersonalDirectoryPB {
  3535.     Ptr                                qLink;
  3536.     long                            reserved1;
  3537.     long                            reserved2;
  3538.     DirIOCompletionUPP                ioCompletion;
  3539.     OSErr                            ioResult;
  3540.     unsigned long                    saveA5;
  3541.     short                            reqCode;
  3542.     long                            reserved[2];
  3543.     AddrBlock                        serverHint;
  3544.     short                            dsRefNum;
  3545.     unsigned long                    callID;
  3546.     AuthIdentity                    identity;
  3547.     long                            gReserved1;
  3548.     long                            gReserved2;
  3549.     long                            gReserved3;
  3550.     long                            clientData;
  3551.     FSSpecPtr                        fsSpec;                        /*  --> FSSpec for the Personal Catalog */
  3552.     OSType                            fdType;                        /*  --> file type for the Personal Catalog */
  3553.     OSType                            fdCreator;                    /*  --> file creator for the Personal Catalog */
  3554. };
  3555. typedef struct DirCreatePersonalDirectoryPB DirCreatePersonalDirectoryPB;
  3556.  
  3557. /*
  3558. DirOpenPersonalDirectory:
  3559. An existing personal catalog can be opened using this call.
  3560. User can specify the personal catalog by FSSpec for the AddressBook file.
  3561. 'accessRequested' field specifies open permissions. 'fsRdPerm'  & 'fsRdWrPerm'
  3562. are the only accepted open modes for the address book.
  3563. When the call completes successfully, a dsRefNum will be returned. The 'dsRefNum'
  3564. field is in the DSParamBlockHeader. In addittion 'accessGranted' indicates
  3565. actual permission with personal catalog is opened and 'features' indicate the capabilty flags
  3566. associated with the personal catalog.
  3567. This call is supported 'synchronous' mode only.
  3568. */
  3569. struct DirOpenPersonalDirectoryPB {
  3570.     Ptr                                qLink;
  3571.     long                            reserved1;
  3572.     long                            reserved2;
  3573.     DirIOCompletionUPP                ioCompletion;
  3574.     OSErr                            ioResult;
  3575.     unsigned long                    saveA5;
  3576.     short                            reqCode;
  3577.     long                            reserved[2];
  3578.     AddrBlock                        serverHint;
  3579.     short                            dsRefNum;
  3580.     unsigned long                    callID;
  3581.     AuthIdentity                    identity;
  3582.     long                            gReserved1;
  3583.     long                            gReserved2;
  3584.     long                            gReserved3;
  3585.     long                            clientData;
  3586.     FSSpecPtr                        fsSpec;                        /*  --> Open an existing Personal Catalog */
  3587.     char                            accessRequested;            /*  --> Open: permissions Requested(byte)*/
  3588.     char                            accessGranted;                /*  <-- Open: permissions (byte) (Granted)*/
  3589.     DirGestalt                        features;                    /* <--  features for Personal Catalog */
  3590. };
  3591. typedef struct DirOpenPersonalDirectoryPB DirOpenPersonalDirectoryPB;
  3592.  
  3593. /*
  3594. DirClosePersonalDirectory: This call lets a client close AddressBook opened by DirOpenPersonalDirectory.
  3595. The Personal Catalog specified by the 'dsRefNum' will be closed.
  3596. This call is supported 'synchronous' mode only.
  3597. */
  3598. struct DirClosePersonalDirectoryPB {
  3599.     Ptr                                qLink;
  3600.     long                            reserved1;
  3601.     long                            reserved2;
  3602.     DirIOCompletionUPP                ioCompletion;
  3603.     OSErr                            ioResult;
  3604.     unsigned long                    saveA5;
  3605.     short                            reqCode;
  3606.     long                            reserved[2];
  3607.     AddrBlock                        serverHint;
  3608.     short                            dsRefNum;
  3609.     unsigned long                    callID;
  3610.     AuthIdentity                    identity;
  3611.     long                            gReserved1;
  3612.     long                            gReserved2;
  3613.     long                            gReserved3;
  3614.     long                            clientData;
  3615. };
  3616. typedef struct DirClosePersonalDirectoryPB DirClosePersonalDirectoryPB;
  3617.  
  3618. /*
  3619. DirMakePersonalDirectoryRLI: With this call a client can make an RLI
  3620. for a Personal Catalog opened by DirOpenPersonalDirectory Call.
  3621. A packed RLI is created for the Personal Catalog specified by the 'dsRefNum'.
  3622. If a client has a need to make the AddressBook reference to persistent
  3623. acrross boots it should make use of this call. In the current implementaion
  3624. PackedRLI has an embeeded System7.0 'alias'. If in later time
  3625. If client has a need to make reference to the AddressBook, it must use
  3626. ADAPLibrary call 'DUExtractAlias' and resole the 'alias' to 'FSSpec' and
  3627. make DirOpenPersonalDirectory call to get a 'dsRefNum'.
  3628.   'fromFSSpec'            FSPecPtr from which relative alias to be created. If nil,
  3629.                         absolute alias is created.
  3630.  'pRLIBufferSize' indicates the size of buffer pointed by 'pRLI'
  3631.  'pRLISize'    indicates the actual length of 'pRLI'. If the call
  3632.                         fails with 'kOCEMoreData' error a client can reissue
  3633.                     this call with a larger buffer of this length.
  3634.   'pRLI' is pointer to the buffer in which 'PackedRLI' is
  3635.   returned.
  3636. This call is supported in 'synchronous' mode only.
  3637. */
  3638. struct DirMakePersonalDirectoryRLIPB {
  3639.     Ptr                                qLink;
  3640.     long                            reserved1;
  3641.     long                            reserved2;
  3642.     DirIOCompletionUPP                ioCompletion;
  3643.     OSErr                            ioResult;
  3644.     unsigned long                    saveA5;
  3645.     short                            reqCode;
  3646.     long                            reserved[2];
  3647.     AddrBlock                        serverHint;
  3648.     short                            dsRefNum;
  3649.     unsigned long                    callID;
  3650.     AuthIdentity                    identity;
  3651.     long                            gReserved1;
  3652.     long                            gReserved2;
  3653.     long                            gReserved3;
  3654.     long                            clientData;
  3655.     FSSpecPtr                        fromFSSpec;                    /*  --> FSSpec for creating relative alia */
  3656.     unsigned short                    pRLIBufferSize;                /*  --> Length of 'pRLI' buffer */
  3657.     unsigned short                    pRLISize;                    /* <--  Length of actual 'pRLI' */
  3658.     PackedRLIPtr                    pRLI;                        /* <--  pRLI for the specified AddressBook */
  3659. };
  3660. typedef struct DirMakePersonalDirectoryRLIPB DirMakePersonalDirectoryRLIPB;
  3661.  
  3662. /*****************************************************************************
  3663. The calls described below apply only for CSAM Drivers:
  3664.  
  3665. The following three calls provide capability to Install/Remove a CSAM at RunTime.
  3666.     DirAddDSAM
  3667.     DirRemoveDSAM
  3668.     DirInstantiateDSAM
  3669.  
  3670. The following two calls provide capability to Install/Remove a CSAM Catalog at RunTime.
  3671.     DirAddDSAMDirectory
  3672.     DirRemoveDirectory
  3673.  
  3674. DirGetDirectoryIcon call is used by clients to get any special icon associated
  3675. with a CSAM catalog.
  3676.  
  3677. *****************************************************************************/
  3678. /*
  3679. DirAddDSAM: This call can be used to inorm the availability of a CSAM file
  3680. after discovering the CSAM file.
  3681.     dsamName -> is generic CSAM name e.g. Untitled X.500 directory
  3682.     dsamSignature -> could be generic CSAM kind e.g. 'X500'.
  3683.     fsSpec -> is the FileSpec for the file containing CSAM resources.
  3684. If the call is successfull 'DSAMRecordCID' will be returned. If the
  3685. call returns 'daDSAMRecordCIDExists', record was already there and
  3686. 'dsamRecordCID' will be returned.
  3687. This call can be done only in synchronous mode.
  3688. */
  3689. struct DirAddDSAMPB {
  3690.     Ptr                                qLink;
  3691.     long                            reserved1;
  3692.     long                            reserved2;
  3693.     DirIOCompletionUPP                ioCompletion;
  3694.     OSErr                            ioResult;
  3695.     unsigned long                    saveA5;
  3696.     short                            reqCode;
  3697.     long                            reserved[2];
  3698.     AddrBlock                        serverHint;
  3699.     short                            dsRefNum;
  3700.     unsigned long                    callID;
  3701.     AuthIdentity                    identity;
  3702.     long                            gReserved1;
  3703.     long                            gReserved2;
  3704.     long                            gReserved3;
  3705.     long                            clientData;
  3706.     CreationID                        dsamRecordCID;                /* <--  CreationID for the CSAM record */
  3707.     RStringPtr                        dsamName;                    /*  --> CSAM name */
  3708.     OCEDirectoryKind                dsamKind;                    /*  --> CSAM kind */
  3709.     FSSpecPtr                        fsSpec;                        /*  --> FSSpec for the file containing CSAM */
  3710. };
  3711. typedef struct DirAddDSAMPB DirAddDSAMPB;
  3712.  
  3713. /*
  3714. DirInstantiateDSAM: This call should be used by the CSAM driver in response
  3715. Driver Open call to indicate the toolbox about the availability of the CSAM.
  3716.     dsamName -> is generic CSAM name e.g. Untitled X.500 directory
  3717.     dsamKind -> could be generic CSAM kind e.g. 'X500'.
  3718.     dsamData -> pointer to private DSAMData. This will be paased back to the CSAM
  3719.     when the CSAM functions (DSAMDirProc,DSAMDirParseProc, DSAMAuthProc) are called.
  3720.     CSAM should already be setup using DirAddDSAM call.
  3721.     DSAMDirProc -> This procedure will be called when  any catalog service
  3722.     call intended for the CSAM (other then parse calls)
  3723.     DSAMDirParseProc -> This procedure will be called when any of the parse calls
  3724.     are called.
  3725.     DSAMAuthProc -> This procedure will be called when any of the Authentication Calls
  3726.     are made to the CSAM. If the CSAM does not support authentication, this can be nil.
  3727. This call can be done only in synchronous mode.
  3728. */
  3729. typedef pascal OSErr (*DSAMDirProcPtr)(Ptr dsamData, DirParamBlockPtr paramBlock, Boolean async);
  3730.  
  3731. #if GENERATINGCFM
  3732. typedef UniversalProcPtr DSAMDirUPP;
  3733. #else
  3734. typedef DSAMDirProcPtr DSAMDirUPP;
  3735. #endif
  3736.  
  3737. typedef DSAMDirUPP DSAMDirProc;
  3738.  
  3739. typedef pascal OSErr (*DSAMDirParseProcPtr)(Ptr dsamData, DirParamBlockPtr paramBlock, Boolean async);
  3740.  
  3741. #if GENERATINGCFM
  3742. typedef UniversalProcPtr DSAMDirParseUPP;
  3743. #else
  3744. typedef DSAMDirParseProcPtr DSAMDirParseUPP;
  3745. #endif
  3746.  
  3747. typedef DSAMDirParseUPP DSAMDirParseProc;
  3748.  
  3749. typedef pascal OSErr (*DSAMAuthProcPtr)(Ptr dsamData, AuthParamBlockPtr pb, Boolean async);
  3750.  
  3751. #if GENERATINGCFM
  3752. typedef UniversalProcPtr DSAMAuthUPP;
  3753. #else
  3754. typedef DSAMAuthProcPtr DSAMAuthUPP;
  3755. #endif
  3756.  
  3757. typedef DSAMAuthUPP DSAMAuthProc;
  3758.  
  3759. struct DirInstantiateDSAMPB {
  3760.     Ptr                                qLink;
  3761.     long                            reserved1;
  3762.     long                            reserved2;
  3763.     DirIOCompletionUPP                ioCompletion;
  3764.     OSErr                            ioResult;
  3765.     unsigned long                    saveA5;
  3766.     short                            reqCode;
  3767.     long                            reserved[2];
  3768.     AddrBlock                        serverHint;
  3769.     short                            dsRefNum;
  3770.     unsigned long                    callID;
  3771.     AuthIdentity                    identity;
  3772.     long                            gReserved1;
  3773.     long                            gReserved2;
  3774.     long                            gReserved3;
  3775.     long                            clientData;
  3776.     RStringPtr                        dsamName;                    /*  --> dsamName name */
  3777.     OCEDirectoryKind                dsamKind;                    /*  --> DSAMKind */
  3778.     Ptr                                dsamData;                    /*  --> dsamData  */
  3779.     DSAMDirUPP                        dsamDirProc;                /*  --> of type DSAMDirProc: for catalog service calls */
  3780.     DSAMDirParseUPP                    dsamDirParseProc;            /*  --> of type DSAMDirParseProc: for catalog service parse calls */
  3781.     DSAMAuthUPP                        dsamAuthProc;                /*  --> of type DSAMAuthProc: for authetication service calls */
  3782. };
  3783. typedef struct DirInstantiateDSAMPB DirInstantiateDSAMPB;
  3784.  
  3785. /*
  3786. DirRemoveDSAM: This call can be used to remove  a CSAM file from the OCE Setup.
  3787.     dsamRecordCID -> is the creationID of the CSAM record.
  3788. This call can be made only in synchronous mode.
  3789. */
  3790. struct DirRemoveDSAMPB {
  3791.     Ptr                                qLink;
  3792.     long                            reserved1;
  3793.     long                            reserved2;
  3794.     DirIOCompletionUPP                ioCompletion;
  3795.     OSErr                            ioResult;
  3796.     unsigned long                    saveA5;
  3797.     short                            reqCode;
  3798.     long                            reserved[2];
  3799.     AddrBlock                        serverHint;
  3800.     short                            dsRefNum;
  3801.     unsigned long                    callID;
  3802.     AuthIdentity                    identity;
  3803.     long                            gReserved1;
  3804.     long                            gReserved2;
  3805.     long                            gReserved3;
  3806.     long                            clientData;
  3807.     CreationID                        dsamRecordCID;                /* <--  CreationID for the CSAM record */
  3808. };
  3809. typedef struct DirRemoveDSAMPB DirRemoveDSAMPB;
  3810.  
  3811. /*
  3812. DirAddDSAMDirectory: This call can be used to inorm the availability of a CSAM catalog.
  3813.     dsamRecordCID ->  recordID for the CSAM serving this catalog
  3814.     directoryName ->  name of the catalog
  3815.     discriminator -> discriminator for the catalog
  3816.     directoryRecordCID -> If the call is successful, creationID for the record will
  3817.                             be returned.
  3818. */
  3819. struct DirAddDSAMDirectoryPB {
  3820.     Ptr                                qLink;
  3821.     long                            reserved1;
  3822.     long                            reserved2;
  3823.     DirIOCompletionUPP                ioCompletion;
  3824.     OSErr                            ioResult;
  3825.     unsigned long                    saveA5;
  3826.     short                            reqCode;
  3827.     long                            reserved[2];
  3828.     AddrBlock                        serverHint;
  3829.     short                            dsRefNum;
  3830.     unsigned long                    callID;
  3831.     AuthIdentity                    identity;
  3832.     long                            gReserved1;
  3833.     long                            gReserved2;
  3834.     long                            gReserved3;
  3835.     long                            clientData;
  3836.     CreationID                        dsamRecordCID;                /*  --> CreationID for the CSAM record */
  3837.     DirectoryNamePtr                directoryName;                /*  --> catalog name */
  3838.     DirDiscriminator                discriminator;                /*  --> catalog discriminator */
  3839.     DirGestalt                        features;                    /*  --> capabilty flags for the catalog */
  3840.     CreationID                        directoryRecordCID;            /* <--  creationID for the catalog record */
  3841. };
  3842. typedef struct DirAddDSAMDirectoryPB DirAddDSAMDirectoryPB;
  3843.  
  3844. /*
  3845. DirRemoveDirectory: This call can be used to inform the toolbox that
  3846. catalog specified by 'directoryRecordCID'
  3847. */
  3848. struct DirRemoveDirectoryPB {
  3849.     Ptr                                qLink;
  3850.     long                            reserved1;
  3851.     long                            reserved2;
  3852.     DirIOCompletionUPP                ioCompletion;
  3853.     OSErr                            ioResult;
  3854.     unsigned long                    saveA5;
  3855.     short                            reqCode;
  3856.     long                            reserved[2];
  3857.     AddrBlock                        serverHint;
  3858.     short                            dsRefNum;
  3859.     unsigned long                    callID;
  3860.     AuthIdentity                    identity;
  3861.     long                            gReserved1;
  3862.     long                            gReserved2;
  3863.     long                            gReserved3;
  3864.     long                            clientData;
  3865.     CreationID                        directoryRecordCID;            /*  --> creationID for the catalog record */
  3866. };
  3867. typedef struct DirRemoveDirectoryPB DirRemoveDirectoryPB;
  3868.  
  3869. /*
  3870.  * DSGetExtendedDirectoriesInfo::  This call can be used to get
  3871.  * the information of various foreign catalogs supported.
  3872.  * Typically a DE Template  may make this call to create a
  3873.  * Address template or a Gateway may make this call to findout
  3874.  * catalog name space in which MSAM may would support. 
  3875.  * Client will supply a buffer pointed by 'bufferPtr' of size 'bufferLength'. 
  3876.  * When the call completes with 'daMoreData' error, client can examine 'totalEntries'
  3877.  * returned and reissue the call with increaing buffer.
  3878.  * Toolbox will findout the private information of each of the Foreign Catalogs
  3879.  * by polling CSAM's, Gateways, and MnMServers. The Information returned
  3880.  * for each catalog will be packed in the format: 
  3881.  * typedef struct EachDirectoryData {
  3882.  *  PackedRLI                        pRLI;           //  packed RLI for the catalog
  3883.  *  OSType                            entnType;        //  Entn Type
  3884.  *  long                            hasMailSlot;   //  If this catalog has mail slot this will be 1 otherwise zero
  3885.  *    ProtoRString                    RealName;      //  Packed RString for Real Name (padded to even boundary) 
  3886.  *    ProtoRString                    comment;       //  Packed RString holding any comment for Display (padded to even boundary)
  3887.  *    long                            length;        //  data length
  3888.  *    char                            data[length];  //  data padded to even boundary
  3889.  * };
  3890.  *
  3891.  *
  3892.  *
  3893.  * typedef struct myData {
  3894.  *      EachDirectoryData    data[numberOfEntries];    // data packed in the above format
  3895.  *    };
  3896.  *
  3897.  */
  3898. struct DirGetExtendedDirectoriesInfoPB {
  3899.     Ptr                                qLink;
  3900.     long                            reserved1;
  3901.     long                            reserved2;
  3902.     DirIOCompletionUPP                ioCompletion;
  3903.     OSErr                            ioResult;
  3904.     unsigned long                    saveA5;
  3905.     short                            reqCode;
  3906.     long                            reserved[2];
  3907.     AddrBlock                        serverHint;
  3908.     short                            dsRefNum;
  3909.     unsigned long                    callID;
  3910.     AuthIdentity                    identity;
  3911.     long                            gReserved1;
  3912.     long                            gReserved2;
  3913.     long                            gReserved3;
  3914.     long                            clientData;
  3915.     Ptr                                buffer;                        /*  --> Pointer to a buufer where data will be returned */
  3916.     unsigned long                    bufferSize;                    /*  --> Length of the buffer, Length of actual data will be returned here */
  3917.     unsigned long                    totalEntries;                /* <--  Total Number of Catalogs found */
  3918.     unsigned long                    actualEntries;                /* <--  Total Number of Catalogs entries returned */
  3919. };
  3920. typedef struct DirGetExtendedDirectoriesInfoPB DirGetExtendedDirectoriesInfoPB;
  3921.  
  3922. /*
  3923. DirGetDirectoryIconPB: With this call a client can find out about
  3924. the icons supported by the Catalog.
  3925. Both ADAP and Personal Catalog will not support this call for now.
  3926. A CSAM can support a call so that DE Extension can use this
  3927. call to find appropriate Icons.
  3928.  
  3929. Returns kOCEBufferTooSmall if icon is too small, but will update iconSize.
  3930. */
  3931. struct DirGetDirectoryIconPB {
  3932.     Ptr                                qLink;
  3933.     long                            reserved1;
  3934.     long                            reserved2;
  3935.     DirIOCompletionUPP                ioCompletion;
  3936.     OSErr                            ioResult;
  3937.     unsigned long                    saveA5;
  3938.     short                            reqCode;
  3939.     long                            reserved[2];
  3940.     AddrBlock                        serverHint;
  3941.     short                            dsRefNum;
  3942.     unsigned long                    callID;
  3943.     AuthIdentity                    identity;
  3944.     long                            gReserved1;
  3945.     long                            gReserved2;
  3946.     long                            gReserved3;
  3947.     long                            clientData;
  3948.     PackedRLIPtr                    pRLI;                        /*  --> packed RLI for the catalog */
  3949.     OSType                            iconType;                    /*  --> Type of Icon requested */
  3950.     Ptr                                iconBuffer;                    /*  --> Buffer to hold Icon Data */
  3951.     unsigned long                    bufferSize;                    /*  <-> size of buffer to hold icon data */
  3952. };
  3953. typedef struct DirGetDirectoryIconPB DirGetDirectoryIconPB;
  3954.  
  3955. /*
  3956. DirGetOCESetupRefNum: This call will return 'dsRefnum' for the OCE Setup Personal Catalog
  3957. and oceSetupRecordCID for the oceSetup Record.
  3958. Clients interested in manipulating OCE Setup Personal Catalog directly should
  3959. make this call to get 'dsRefNum'.
  3960. 'dsRefNum' will be returned in the standard field in the DirParamHeader.
  3961. */
  3962. struct DirGetOCESetupRefNumPB {
  3963.     Ptr                                qLink;
  3964.     long                            reserved1;
  3965.     long                            reserved2;
  3966.     DirIOCompletionUPP                ioCompletion;
  3967.     OSErr                            ioResult;
  3968.     unsigned long                    saveA5;
  3969.     short                            reqCode;
  3970.     long                            reserved[2];
  3971.     AddrBlock                        serverHint;
  3972.     short                            dsRefNum;
  3973.     unsigned long                    callID;
  3974.     AuthIdentity                    identity;
  3975.     long                            gReserved1;
  3976.     long                            gReserved2;
  3977.     long                            gReserved3;
  3978.     long                            clientData;
  3979.     CreationID                        oceSetupRecordCID;            /* --> creationID for the catalog record */
  3980. };
  3981. typedef struct DirGetOCESetupRefNumPB DirGetOCESetupRefNumPB;
  3982.  
  3983. /*****************************************************************************/
  3984. /* Catalog and Authentication control blocks and operation definitions */
  3985. union AuthParamBlock {
  3986.     struct {
  3987.         Ptr                                qLink;
  3988.         long                            reserved1;
  3989.         long                            reserved2;
  3990.         AuthIOCompletionUPP                ioCompletion;
  3991.         OSErr                            ioResult;
  3992.         unsigned long                    saveA5;
  3993.         short                            reqCode;
  3994.         long                            reserved[2];
  3995.         AddrBlock                        serverHint;
  3996.         short                            dsRefNum;
  3997.         unsigned long                    callID;
  3998.         AuthIdentity                    identity;
  3999.         long                            gReserved1;
  4000.         long                            gReserved2;
  4001.         long                            gReserved3;
  4002.         long                            clientData;
  4003.     }                                header;
  4004.     AuthBindSpecificIdentityPB        bindIdentityPB;
  4005.     AuthUnbindSpecificIdentityPB    unbindIdentityPB;
  4006.     AuthResolveCreationIDPB            resolveCreationIDPB;
  4007.     AuthGetSpecificIdentityInfoPB    getIdentityInfoPB;
  4008.     AuthAddKeyPB                    addKeyPB;
  4009.     AuthChangeKeyPB                    changeKeyPB;
  4010.     AuthDeleteKeyPB                    deleteKeyPB;
  4011.     AuthPasswordToKeyPB                passwordToKeyPB;
  4012.     AuthGetCredentialsPB            getCredentialsPB;
  4013.     AuthDecryptCredentialsPB        decryptCredentialsPB;
  4014.     AuthMakeChallengePB                makeChallengePB;
  4015.     AuthMakeReplyPB                    makeReplyPB;
  4016.     AuthVerifyReplyPB                verifyReplyPB;
  4017.     AuthGetUTCTimePB                getUTCTimePB;
  4018.     AuthMakeProxyPB                    makeProxyPB;
  4019.     AuthTradeProxyForCredentialsPB    tradeProxyForCredentialsPB;
  4020.     AuthGetLocalIdentityPB            getLocalIdentityPB;
  4021.     AuthUnlockLocalIdentityPB        unLockLocalIdentityPB;
  4022.     AuthLockLocalIdentityPB            lockLocalIdentityPB;
  4023.     AuthAddToLocalIdentityQueuePB    localIdentityQInstallPB;
  4024.     AuthRemoveFromLocalIdentityQueuePB localIdentityQRemovePB;
  4025.     AuthSetupLocalIdentityPB        setupLocalIdentityPB;
  4026.     AuthChangeLocalIdentityPB        changeLocalIdentityPB;
  4027.     AuthRemoveLocalIdentityPB        removeLocalIdentityPB;
  4028.     OCESetupAddDirectoryInfoPB        setupDirectoryIdentityPB;
  4029.     OCESetupChangeDirectoryInfoPB    changeDirectoryIdentityPB;
  4030.     OCESetupRemoveDirectoryInfoPB    removeDirectoryIdentityPB;
  4031.     OCESetupGetDirectoryInfoPB        getDirectoryIdentityInfoPB;
  4032. };
  4033. union DirParamBlock {
  4034.     struct {
  4035.         Ptr                                qLink;
  4036.         long                            reserved1;
  4037.         long                            reserved2;
  4038.         DirIOCompletionUPP                ioCompletion;
  4039.         OSErr                            ioResult;
  4040.         unsigned long                    saveA5;
  4041.         short                            reqCode;
  4042.         long                            reserved[2];
  4043.         AddrBlock                        serverHint;
  4044.         short                            dsRefNum;
  4045.         unsigned long                    callID;
  4046.         AuthIdentity                    identity;
  4047.         long                            gReserved1;
  4048.         long                            gReserved2;
  4049.         long                            gReserved3;
  4050.         long                            clientData;
  4051.     }                                header;
  4052.     DirAddRecordPB                    addRecordPB;
  4053.     DirDeleteRecordPB                deleteRecordPB;
  4054.     DirEnumerateGetPB                enumerateGetPB;
  4055.     DirEnumerateParsePB                enumerateParsePB;
  4056.     DirFindRecordGetPB                findRecordGetPB;
  4057.     DirFindRecordParsePB            findRecordParsePB;
  4058.     DirLookupGetPB                    lookupGetPB;
  4059.     DirLookupParsePB                lookupParsePB;
  4060.     DirAddAttributeValuePB            addAttributeValuePB;
  4061.     DirDeleteAttributeTypePB        deleteAttributeTypePB;
  4062.     DirDeleteAttributeValuePB        deleteAttributeValuePB;
  4063.     DirChangeAttributeValuePB        changeAttributeValuePB;
  4064.     DirVerifyAttributeValuePB        verifyAttributeValuePB;
  4065.     DirFindValuePB                    findValuePB;
  4066.     DirEnumeratePseudonymGetPB        enumeratePseudonymGetPB;
  4067.     DirEnumeratePseudonymParsePB    enumeratePseudonymParsePB;
  4068.     DirAddPseudonymPB                addPseudonymPB;
  4069.     DirDeletePseudonymPB            deletePseudonymPB;
  4070.     DirAddAliasPB                    addAliasPB;
  4071.     DirEnumerateAttributeTypesGetPB    enumerateAttributeTypesGetPB;
  4072.     DirEnumerateAttributeTypesParsePB enumerateAttributeTypesParsePB;
  4073.     DirGetNameAndTypePB                getNameAndTypePB;
  4074.     DirSetNameAndTypePB                setNameAndTypePB;
  4075.     DirGetRecordMetaInfoPB            getRecordMetaInfoPB;
  4076.     DirGetDNodeMetaInfoPB            getDNodeMetaInfoPB;
  4077.     DirGetDirectoryInfoPB            getDirectoryInfoPB;
  4078.     DirGetDNodeAccessControlGetPB    getDNodeAccessControlGetPB;
  4079.     DirGetDNodeAccessControlParsePB    getDNodeAccessControlParsePB;
  4080.     DirGetRecordAccessControlGetPB    getRecordAccessControlGetPB;
  4081.     DirGetRecordAccessControlParsePB getRecordAccessControlParsePB;
  4082.     DirGetAttributeAccessControlGetPB getAttributeAccessControlGetPB;
  4083.     DirGetAttributeAccessControlParsePB getAttributeAccessControlParsePB;
  4084.     DirEnumerateDirectoriesGetPB    enumerateDirectoriesGetPB;
  4085.     DirEnumerateDirectoriesParsePB    enumerateDirectoriesParsePB;
  4086.     DirAddADAPDirectoryPB            addADAPDirectoryPB;
  4087.     DirRemoveDirectoryPB            removeDirectoryPB;
  4088.     DirNetSearchADAPDirectoriesGetPB netSearchADAPDirectoriesGetPB;
  4089.     DirNetSearchADAPDirectoriesParsePB netSearchADAPDirectoriesParsePB;
  4090.     DirFindADAPDirectoryByNetSearchPB findADAPDirectoryByNetSearchPB;
  4091.     DirMapDNodeNumberToPathNamePB    mapDNodeNumberToPathNamePB;
  4092.     DirMapPathNameToDNodeNumberPB    mapPathNameToDNodeNumberPB;
  4093.     DirGetLocalNetworkSpecPB        getLocalNetworkSpecPB;
  4094.     DirGetDNodeInfoPB                getDNodeInfoPB;
  4095.     DirCreatePersonalDirectoryPB    createPersonalDirectoryPB;
  4096.     DirOpenPersonalDirectoryPB        openPersonalDirectoryPB;
  4097.     DirClosePersonalDirectoryPB        closePersonalDirectoryPB;
  4098.     DirMakePersonalDirectoryRLIPB    makePersonalDirectoryRLIPB;
  4099.     DirAddDSAMPB                    addDSAMPB;
  4100.     DirInstantiateDSAMPB            instantiateDSAMPB;
  4101.     DirRemoveDSAMPB                    removeDSAMPB;
  4102.     DirAddDSAMDirectoryPB            addDSAMDirectoryPB;
  4103.     DirGetExtendedDirectoriesInfoPB    getExtendedDirectoriesInfoPB;
  4104.     DirGetDirectoryIconPB            getDirectoryIconPB;
  4105.     DirGetOCESetupRefNumPB            dirGetOCESetupRefNumPB;
  4106.     DirAbortPB                        abortPB;
  4107. };
  4108. enum {
  4109.     uppAuthIOCompletionProcInfo = kPascalStackBased
  4110.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(AuthParamBlockPtr))),
  4111.     uppNotificationProcInfo = kPascalStackBased
  4112.          | RESULT_SIZE(SIZE_CODE(sizeof(Boolean)))
  4113.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(long)))
  4114.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(AuthLocalIdentityOp)))
  4115.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(AuthLocalIdentityLockAction)))
  4116.          | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(LocalIdentity))),
  4117.     uppDirIOCompletionProcInfo = kPascalStackBased
  4118.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(DirParamBlockPtr))),
  4119.     uppForEachDirEnumSpecProcInfo = kPascalStackBased
  4120.          | RESULT_SIZE(SIZE_CODE(sizeof(Boolean)))
  4121.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(long)))
  4122.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(DirEnumSpec*))),
  4123.     uppForEachRecordProcInfo = kPascalStackBased
  4124.          | RESULT_SIZE(SIZE_CODE(sizeof(Boolean)))
  4125.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(long)))
  4126.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(DirEnumSpec*)))
  4127.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(PackedRLIPtr))),
  4128.     uppForEachLookupRecordIDProcInfo = kPascalStackBased
  4129.          | RESULT_SIZE(SIZE_CODE(sizeof(Boolean)))
  4130.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(long)))
  4131.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(RecordID*))),
  4132.     uppForEachAttrTypeLookupProcInfo = kPascalStackBased
  4133.          | RESULT_SIZE(SIZE_CODE(sizeof(Boolean)))
  4134.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(long)))
  4135.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(AttributeType*)))
  4136.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(AccessMask))),
  4137.     uppForEachAttrValueProcInfo = kPascalStackBased
  4138.          | RESULT_SIZE(SIZE_CODE(sizeof(Boolean)))
  4139.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(long)))
  4140.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(Attribute*))),
  4141.     uppForEachAttrTypeProcInfo = kPascalStackBased
  4142.          | RESULT_SIZE(SIZE_CODE(sizeof(Boolean)))
  4143.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(long)))
  4144.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(AttributeType*))),
  4145.     uppForEachRecordIDProcInfo = kPascalStackBased
  4146.          | RESULT_SIZE(SIZE_CODE(sizeof(Boolean)))
  4147.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(long)))
  4148.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(RecordID*))),
  4149.     uppForEachDirectoryProcInfo = kPascalStackBased
  4150.          | RESULT_SIZE(SIZE_CODE(sizeof(Boolean)))
  4151.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(long)))
  4152.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(DirectoryName*)))
  4153.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(DirDiscriminator*)))
  4154.          | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(DirGestalt))),
  4155.     uppForEachADAPDirectoryProcInfo = kPascalStackBased
  4156.          | RESULT_SIZE(SIZE_CODE(sizeof(Boolean)))
  4157.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(long)))
  4158.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(DirectoryName*)))
  4159.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(DirDiscriminator*)))
  4160.          | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(DirGestalt)))
  4161.          | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(AddrBlock))),
  4162.     uppForEachDNodeAccessControlProcInfo = kPascalStackBased
  4163.          | RESULT_SIZE(SIZE_CODE(sizeof(Boolean)))
  4164.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(long)))
  4165.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(DSSpec*)))
  4166.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(AccessMask)))
  4167.          | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(AccessMask)))
  4168.          | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(AccessMask))),
  4169.     uppForEachRecordAccessControlProcInfo = kPascalStackBased
  4170.          | RESULT_SIZE(SIZE_CODE(sizeof(Boolean)))
  4171.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(long)))
  4172.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(DSSpec*)))
  4173.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(AccessMask)))
  4174.          | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(AccessMask)))
  4175.          | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(AccessMask))),
  4176.     uppForEachAttributeAccessControlProcInfo = kPascalStackBased
  4177.          | RESULT_SIZE(SIZE_CODE(sizeof(Boolean)))
  4178.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(long)))
  4179.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(DSSpec*)))
  4180.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(AccessMask)))
  4181.          | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(AccessMask)))
  4182.          | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(AccessMask))),
  4183.     uppDSAMDirProcInfo = kPascalStackBased
  4184.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  4185.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(Ptr)))
  4186.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(DirParamBlockPtr)))
  4187.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(Boolean))),
  4188.     uppDSAMDirParseProcInfo = kPascalStackBased
  4189.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  4190.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(Ptr)))
  4191.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(DirParamBlockPtr)))
  4192.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(Boolean))),
  4193.     uppDSAMAuthProcInfo = kPascalStackBased
  4194.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  4195.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(Ptr)))
  4196.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(AuthParamBlockPtr)))
  4197.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(Boolean)))
  4198. };
  4199.  
  4200. #if GENERATINGCFM
  4201. #define CallAuthIOCompletionProc(userRoutine, paramBlock)        \
  4202.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppAuthIOCompletionProcInfo, (paramBlock))
  4203. #define CallNotificationProc(userRoutine, clientData, callValue, actionValue, identity)        \
  4204.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppNotificationProcInfo, (clientData), (callValue), (actionValue), (identity))
  4205. #define CallDirIOCompletionProc(userRoutine, paramBlock)        \
  4206.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppDirIOCompletionProcInfo, (paramBlock))
  4207. #define CallForEachDirEnumSpecProc(userRoutine, clientData, enumSpec)        \
  4208.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppForEachDirEnumSpecProcInfo, (clientData), (enumSpec))
  4209. #define CallForEachRecordProc(userRoutine, clientData, enumSpec, pRLI)        \
  4210.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppForEachRecordProcInfo, (clientData), (enumSpec), (pRLI))
  4211. #define CallForEachLookupRecordIDProc(userRoutine, clientData, recordID)        \
  4212.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppForEachLookupRecordIDProcInfo, (clientData), (recordID))
  4213. #define CallForEachAttrTypeLookupProc(userRoutine, clientData, attrType, myAttrAccMask)        \
  4214.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppForEachAttrTypeLookupProcInfo, (clientData), (attrType), (myAttrAccMask))
  4215. #define CallForEachAttrValueProc(userRoutine, clientData, attribute)        \
  4216.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppForEachAttrValueProcInfo, (clientData), (attribute))
  4217. #define CallForEachAttrTypeProc(userRoutine, clientData, attrType)        \
  4218.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppForEachAttrTypeProcInfo, (clientData), (attrType))
  4219. #define CallForEachRecordIDProc(userRoutine, clientData, recordID)        \
  4220.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppForEachRecordIDProcInfo, (clientData), (recordID))
  4221. #define CallForEachDirectoryProc(userRoutine, clientData, dirName, discriminator, features)        \
  4222.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppForEachDirectoryProcInfo, (clientData), (dirName), (discriminator), (features))
  4223. #define CallForEachADAPDirectoryProc(userRoutine, clientData, dirName, discriminator, features, serverHint)        \
  4224.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppForEachADAPDirectoryProcInfo, (clientData), (dirName), (discriminator), (features), (serverHint))
  4225. #define CallForEachDNodeAccessControlProc(userRoutine, clientData, dsObj, activeDnodeAccMask, defaultRecordAccMask, defaultAttributeAccMask)        \
  4226.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppForEachDNodeAccessControlProcInfo, (clientData), (dsObj), (activeDnodeAccMask), (defaultRecordAccMask), (defaultAttributeAccMask))
  4227. #define CallForEachRecordAccessControlProc(userRoutine, clientData, dsObj, activeDnodeAccMask, activeRecordAccMask, defaultAttributeAccMask)        \
  4228.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppForEachRecordAccessControlProcInfo, (clientData), (dsObj), (activeDnodeAccMask), (activeRecordAccMask), (defaultAttributeAccMask))
  4229. #define CallForEachAttributeAccessControlProc(userRoutine, clientData, dsObj, activeDnodeAccMask, activeRecordAccMask, activeAttributeAccMask)        \
  4230.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppForEachAttributeAccessControlProcInfo, (clientData), (dsObj), (activeDnodeAccMask), (activeRecordAccMask), (activeAttributeAccMask))
  4231. #define CallDSAMDirProc(userRoutine, dsamData, paramBlock, async)        \
  4232.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppDSAMDirProcInfo, (dsamData), (paramBlock), (async))
  4233. #define CallDSAMDirParseProc(userRoutine, dsamData, paramBlock, async)        \
  4234.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppDSAMDirParseProcInfo, (dsamData), (paramBlock), (async))
  4235. #define CallDSAMAuthProc(userRoutine, dsamData, pb, async)        \
  4236.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppDSAMAuthProcInfo, (dsamData), (pb), (async))
  4237. #else
  4238. #define CallAuthIOCompletionProc(userRoutine, paramBlock)        \
  4239.         (*(userRoutine))((paramBlock))
  4240. #define CallNotificationProc(userRoutine, clientData, callValue, actionValue, identity)        \
  4241.         (*(userRoutine))((clientData), (callValue), (actionValue), (identity))
  4242. #define CallDirIOCompletionProc(userRoutine, paramBlock)        \
  4243.         (*(userRoutine))((paramBlock))
  4244. #define CallForEachDirEnumSpecProc(userRoutine, clientData, enumSpec)        \
  4245.         (*(userRoutine))((clientData), (enumSpec))
  4246. #define CallForEachRecordProc(userRoutine, clientData, enumSpec, pRLI)        \
  4247.         (*(userRoutine))((clientData), (enumSpec), (pRLI))
  4248. #define CallForEachLookupRecordIDProc(userRoutine, clientData, recordID)        \
  4249.         (*(userRoutine))((clientData), (recordID))
  4250. #define CallForEachAttrTypeLookupProc(userRoutine, clientData, attrType, myAttrAccMask)        \
  4251.         (*(userRoutine))((clientData), (attrType), (myAttrAccMask))
  4252. #define CallForEachAttrValueProc(userRoutine, clientData, attribute)        \
  4253.         (*(userRoutine))((clientData), (attribute))
  4254. #define CallForEachAttrTypeProc(userRoutine, clientData, attrType)        \
  4255.         (*(userRoutine))((clientData), (attrType))
  4256. #define CallForEachRecordIDProc(userRoutine, clientData, recordID)        \
  4257.         (*(userRoutine))((clientData), (recordID))
  4258. #define CallForEachDirectoryProc(userRoutine, clientData, dirName, discriminator, features)        \
  4259.         (*(userRoutine))((clientData), (dirName), (discriminator), (features))
  4260. #define CallForEachADAPDirectoryProc(userRoutine, clientData, dirName, discriminator, features, serverHint)        \
  4261.         (*(userRoutine))((clientData), (dirName), (discriminator), (features), (serverHint))
  4262. #define CallForEachDNodeAccessControlProc(userRoutine, clientData, dsObj, activeDnodeAccMask, defaultRecordAccMask, defaultAttributeAccMask)        \
  4263.         (*(userRoutine))((clientData), (dsObj), (activeDnodeAccMask), (defaultRecordAccMask), (defaultAttributeAccMask))
  4264. #define CallForEachRecordAccessControlProc(userRoutine, clientData, dsObj, activeDnodeAccMask, activeRecordAccMask, defaultAttributeAccMask)        \
  4265.         (*(userRoutine))((clientData), (dsObj), (activeDnodeAccMask), (activeRecordAccMask), (defaultAttributeAccMask))
  4266. #define CallForEachAttributeAccessControlProc(userRoutine, clientData, dsObj, activeDnodeAccMask, activeRecordAccMask, activeAttributeAccMask)        \
  4267.         (*(userRoutine))((clientData), (dsObj), (activeDnodeAccMask), (activeRecordAccMask), (activeAttributeAccMask))
  4268. #define CallDSAMDirProc(userRoutine, dsamData, paramBlock, async)        \
  4269.         (*(userRoutine))((dsamData), (paramBlock), (async))
  4270. #define CallDSAMDirParseProc(userRoutine, dsamData, paramBlock, async)        \
  4271.         (*(userRoutine))((dsamData), (paramBlock), (async))
  4272. #define CallDSAMAuthProc(userRoutine, dsamData, pb, async)        \
  4273.         (*(userRoutine))((dsamData), (pb), (async))
  4274. #endif
  4275.  
  4276. #if GENERATINGCFM
  4277. #define NewAuthIOCompletionProc(userRoutine)        \
  4278.         (AuthIOCompletionUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppAuthIOCompletionProcInfo, GetCurrentArchitecture())
  4279. #define NewNotificationProc(userRoutine)        \
  4280.         (NotificationUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppNotificationProcInfo, GetCurrentArchitecture())
  4281. #define NewDirIOCompletionProc(userRoutine)        \
  4282.         (DirIOCompletionUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppDirIOCompletionProcInfo, GetCurrentArchitecture())
  4283. #define NewForEachDirEnumSpecProc(userRoutine)        \
  4284.         (ForEachDirEnumSpecUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppForEachDirEnumSpecProcInfo, GetCurrentArchitecture())
  4285. #define NewForEachRecordProc(userRoutine)        \
  4286.         (ForEachRecordUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppForEachRecordProcInfo, GetCurrentArchitecture())
  4287. #define NewForEachLookupRecordIDProc(userRoutine)        \
  4288.         (ForEachLookupRecordIDUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppForEachLookupRecordIDProcInfo, GetCurrentArchitecture())
  4289. #define NewForEachAttrTypeLookupProc(userRoutine)        \
  4290.         (ForEachAttrTypeLookupUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppForEachAttrTypeLookupProcInfo, GetCurrentArchitecture())
  4291. #define NewForEachAttrValueProc(userRoutine)        \
  4292.         (ForEachAttrValueUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppForEachAttrValueProcInfo, GetCurrentArchitecture())
  4293. #define NewForEachAttrTypeProc(userRoutine)        \
  4294.         (ForEachAttrTypeUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppForEachAttrTypeProcInfo, GetCurrentArchitecture())
  4295. #define NewForEachRecordIDProc(userRoutine)        \
  4296.         (ForEachRecordIDUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppForEachRecordIDProcInfo, GetCurrentArchitecture())
  4297. #define NewForEachDirectoryProc(userRoutine)        \
  4298.         (ForEachDirectoryUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppForEachDirectoryProcInfo, GetCurrentArchitecture())
  4299. #define NewForEachADAPDirectoryProc(userRoutine)        \
  4300.         (ForEachADAPDirectoryUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppForEachADAPDirectoryProcInfo, GetCurrentArchitecture())
  4301. #define NewForEachDNodeAccessControlProc(userRoutine)        \
  4302.         (ForEachDNodeAccessControlUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppForEachDNodeAccessControlProcInfo, GetCurrentArchitecture())
  4303. #define NewForEachRecordAccessControlProc(userRoutine)        \
  4304.         (ForEachRecordAccessControlUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppForEachRecordAccessControlProcInfo, GetCurrentArchitecture())
  4305. #define NewForEachAttributeAccessControlProc(userRoutine)        \
  4306.         (ForEachAttributeAccessControlUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppForEachAttributeAccessControlProcInfo, GetCurrentArchitecture())
  4307. #define NewDSAMDirProc(userRoutine)        \
  4308.         (DSAMDirUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppDSAMDirProcInfo, GetCurrentArchitecture())
  4309. #define NewDSAMDirParseProc(userRoutine)        \
  4310.         (DSAMDirParseUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppDSAMDirParseProcInfo, GetCurrentArchitecture())
  4311. #define NewDSAMAuthProc(userRoutine)        \
  4312.         (DSAMAuthUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppDSAMAuthProcInfo, GetCurrentArchitecture())
  4313. #else
  4314. #define NewAuthIOCompletionProc(userRoutine)        \
  4315.         ((AuthIOCompletionUPP) (userRoutine))
  4316. #define NewNotificationProc(userRoutine)        \
  4317.         ((NotificationUPP) (userRoutine))
  4318. #define NewDirIOCompletionProc(userRoutine)        \
  4319.         ((DirIOCompletionUPP) (userRoutine))
  4320. #define NewForEachDirEnumSpecProc(userRoutine)        \
  4321.         ((ForEachDirEnumSpecUPP) (userRoutine))
  4322. #define NewForEachRecordProc(userRoutine)        \
  4323.         ((ForEachRecordUPP) (userRoutine))
  4324. #define NewForEachLookupRecordIDProc(userRoutine)        \
  4325.         ((ForEachLookupRecordIDUPP) (userRoutine))
  4326. #define NewForEachAttrTypeLookupProc(userRoutine)        \
  4327.         ((ForEachAttrTypeLookupUPP) (userRoutine))
  4328. #define NewForEachAttrValueProc(userRoutine)        \
  4329.         ((ForEachAttrValueUPP) (userRoutine))
  4330. #define NewForEachAttrTypeProc(userRoutine)        \
  4331.         ((ForEachAttrTypeUPP) (userRoutine))
  4332. #define NewForEachRecordIDProc(userRoutine)        \
  4333.         ((ForEachRecordIDUPP) (userRoutine))
  4334. #define NewForEachDirectoryProc(userRoutine)        \
  4335.         ((ForEachDirectoryUPP) (userRoutine))
  4336. #define NewForEachADAPDirectoryProc(userRoutine)        \
  4337.         ((ForEachADAPDirectoryUPP) (userRoutine))
  4338. #define NewForEachDNodeAccessControlProc(userRoutine)        \
  4339.         ((ForEachDNodeAccessControlUPP) (userRoutine))
  4340. #define NewForEachRecordAccessControlProc(userRoutine)        \
  4341.         ((ForEachRecordAccessControlUPP) (userRoutine))
  4342. #define NewForEachAttributeAccessControlProc(userRoutine)        \
  4343.         ((ForEachAttributeAccessControlUPP) (userRoutine))
  4344. #define NewDSAMDirProc(userRoutine)        \
  4345.         ((DSAMDirUPP) (userRoutine))
  4346. #define NewDSAMDirParseProc(userRoutine)        \
  4347.         ((DSAMDirParseUPP) (userRoutine))
  4348. #define NewDSAMAuthProc(userRoutine)        \
  4349.         ((DSAMAuthUPP) (userRoutine))
  4350. #endif
  4351.  
  4352. /*************************************************************/
  4353. /*
  4354. These are the selector values used after the trap dispatch to determine just
  4355. what call the client made to my toolbox.  These bear no relationship to the
  4356. procedure numbers used in the client-to-server protocol.
  4357. */
  4358. /* Note:  0x21C, 0x21D are used internally
  4359.  */
  4360. #define kAuthBindSpecificIdentity 0x200
  4361. #define kAuthUnbindSpecificIdentity 0x201
  4362. #define kAuthResolveCreationID 0x202
  4363. #define kAuthGetSpecificIdentityInfo 0x203
  4364. #define kAuthGetLocalIdentity 0x204
  4365. #define kAuthAddToLocalIdentityQueue 0x205
  4366. #define kAuthRemoveFromLocalIdentityQueue 0x206
  4367. #define kAuthAddKey 0x207
  4368. #define kAuthChangeKey 0x208
  4369. #define kAuthDeleteKey 0x209
  4370. #define kAuthPasswordToKey 0x20A
  4371. #define kAuthGetCredentials 0x20B
  4372. #define kAuthDecryptCredentials 0x20C
  4373. #define kOCESetupRemoveDirectoryInfo 0x20D
  4374. #define kOCESetupGetDirectoryInfo 0x20E
  4375. #define kAuthMakeChallenge 0x20F
  4376. #define kAuthMakeReply 0x210
  4377. #define kAuthVerifyReply 0x211
  4378. #define kAuthMakeProxy 0x212
  4379. #define kAuthTradeProxyForCredentials 0x213
  4380. #define kAuthUnlockLocalIdentity 0x214
  4381. #define kAuthLockLocalIdentity 0x215
  4382. #define kAuthSetupLocalIdentity 0x216
  4383. #define kAuthChangeLocalIdentity 0x217
  4384. #define kAuthRemoveLocalIdentity 0x218
  4385. #define kOCESetupAddDirectoryInfo 0x219
  4386. #define kAuthGetUTCTime 0x21A
  4387. #define kOCESetupChangeDirectoryInfo 0x21B
  4388. #define kDirEnumerateParse 0x101
  4389. #define kDirLookupParse 0x102
  4390. #define kDirEnumerateAttributeTypesParse 0x103
  4391. #define kDirEnumeratePseudonymParse 0x104
  4392. #define kDirNetSearchADAPDirectoriesParse 0x105
  4393. #define kDirEnumerateDirectoriesParse 0x106
  4394. #define kDirFindADAPDirectoryByNetSearch 0x107
  4395. #define kDirNetSearchADAPDirectoriesGet 0x108
  4396. #define kDirAddRecord 0x109
  4397. #define kDirDeleteRecord 0x10A
  4398. #define kDirAddAttributeValue 0x10B
  4399. #define kDirDeleteAttributeValue 0x10C
  4400. #define kDirChangeAttributeValue 0x10D
  4401. #define kDirVerifyAttributeValue 0x10E
  4402. #define kDirAddPseudonym 0x10F
  4403. #define kDirDeletePseudonym 0x110
  4404. #define kDirEnumerateGet 0x111
  4405. #define kDirEnumerateAttributeTypesGet 0x112
  4406. #define kDirEnumeratePseudonymGet 0x113
  4407. #define kDirGetNameAndType 0x114
  4408. #define kDirSetNameAndType 0x115
  4409. #define kDirGetRecordMetaInfo 0x116
  4410. #define kDirLookupGet 0x117
  4411. #define kDirGetDNodeMetaInfo 0x118
  4412. #define kDirGetDirectoryInfo 0x119
  4413. #define kDirEnumerateDirectoriesGet 0x11A
  4414. #define kDirAbort 0x11B
  4415. #define kDirAddAlias 0x11C
  4416. #define kDirAddDSAM 0x11D
  4417. #define kDirOpenPersonalDirectory 0x11E
  4418. #define kDirCreatePersonalDirectory 0x11F
  4419. #define kDirRemoveDSAM 0x120
  4420. #define kDirGetDirectoryIcon 0x121
  4421. #define kDirMapPathNameToDNodeNumber 0x122
  4422. #define kDirMapDNodeNumberToPathName 0x123
  4423. #define kDirGetLocalNetworkSpec 0x124
  4424. #define kDirGetDNodeInfo 0x125
  4425. #define kDirFindValue 0x126
  4426. #define kDirInstantiateDSAM 0x127
  4427. #define kDirGetOCESetupRefNum 0x128
  4428. #define kDirGetDNodeAccessControlGet 0x12A
  4429. #define kDirGetRecordAccessControlGet 0x12C
  4430. #define kDirGetAttributeAccessControlGet 0x12E
  4431. #define kDirGetDNodeAccessControlParse 0x12F
  4432. #define kDirDeleteAttributeType 0x130
  4433. #define kDirClosePersonalDirectory 0x131
  4434. #define kDirMakePersonalDirectoryRLI 0x132
  4435. #define kDirAddDSAMDirectory 0x133
  4436. #define kDirGetRecordAccessControlParse 0x134
  4437. #define kDirRemoveDirectory 0x135
  4438. #define kDirGetExtendedDirectoriesInfo 0x136
  4439. #define kDirAddADAPDirectory 0x137
  4440. #define kDirGetAttributeAccessControlParse 0x138
  4441. #define kDirFindRecordGet 0x140
  4442. #define kDirFindRecordParse 0x141
  4443. extern pascal OSErr AuthBindSpecificIdentity(AuthParamBlockPtr paramBlock, Boolean async)
  4444.  THREEWORDINLINE(0x3F3C, 0x200, 0xAA5E);
  4445. extern pascal OSErr AuthUnbindSpecificIdentity(AuthParamBlockPtr paramBlock, Boolean async)
  4446.  THREEWORDINLINE(0x3F3C, 0x201, 0xAA5E);
  4447. extern pascal OSErr AuthResolveCreationID(AuthParamBlockPtr paramBlock, Boolean async)
  4448.  THREEWORDINLINE(0x3F3C, 0x202, 0xAA5E);
  4449. extern pascal OSErr AuthGetSpecificIdentityInfo(AuthParamBlockPtr paramBlock, Boolean async)
  4450.  THREEWORDINLINE(0x3F3C, 0x203, 0xAA5E);
  4451. extern pascal OSErr AuthAddKey(AuthParamBlockPtr paramBlock, Boolean async)
  4452.  THREEWORDINLINE(0x3F3C, 0x207, 0xAA5E);
  4453. extern pascal OSErr AuthChangeKey(AuthParamBlockPtr paramBlock, Boolean async)
  4454.  THREEWORDINLINE(0x3F3C, 0x208, 0xAA5E);
  4455. extern pascal OSErr AuthDeleteKey(AuthParamBlockPtr paramBlock, Boolean async)
  4456.  THREEWORDINLINE(0x3F3C, 0x209, 0xAA5E);
  4457. extern pascal OSErr AuthPasswordToKey(AuthParamBlockPtr paramBlock, Boolean async)
  4458.  THREEWORDINLINE(0x3F3C, 0x20A, 0xAA5E);
  4459. extern pascal OSErr AuthGetCredentials(AuthParamBlockPtr paramBlock, Boolean async)
  4460.  THREEWORDINLINE(0x3F3C, 0x20B, 0xAA5E);
  4461. extern pascal OSErr AuthDecryptCredentials(AuthParamBlockPtr paramBlock, Boolean async)
  4462.  THREEWORDINLINE(0x3F3C, 0x20C, 0xAA5E);
  4463. extern pascal OSErr AuthMakeChallenge(AuthParamBlockPtr paramBlock, Boolean async)
  4464.  THREEWORDINLINE(0x3F3C, 0x20F, 0xAA5E);
  4465. extern pascal OSErr AuthMakeReply(AuthParamBlockPtr paramBlock, Boolean async)
  4466.  THREEWORDINLINE(0x3F3C, 0x210, 0xAA5E);
  4467. extern pascal OSErr AuthVerifyReply(AuthParamBlockPtr paramBlock, Boolean async)
  4468.  THREEWORDINLINE(0x3F3C, 0x211, 0xAA5E);
  4469. extern pascal OSErr AuthGetUTCTime(AuthParamBlockPtr paramBlock, Boolean async)
  4470.  THREEWORDINLINE(0x3F3C, 0x21A, 0xAA5E);
  4471. extern pascal OSErr AuthMakeProxy(AuthParamBlockPtr paramBlock, Boolean async)
  4472.  THREEWORDINLINE(0x3F3C, 0x212, 0xAA5E);
  4473. extern pascal OSErr AuthTradeProxyForCredentials(AuthParamBlockPtr paramBlock, Boolean async)
  4474.  THREEWORDINLINE(0x3F3C, 0x213, 0xAA5E);
  4475. /* Local Identity API */
  4476. extern pascal OSErr AuthGetLocalIdentity(AuthParamBlockPtr paramBlock, Boolean async)
  4477.  THREEWORDINLINE(0x3F3C, 0x204, 0xAA5E);
  4478. extern pascal OSErr AuthUnlockLocalIdentity(AuthParamBlockPtr paramBlock, Boolean async)
  4479.  THREEWORDINLINE(0x3F3C, 0x214, 0xAA5E);
  4480. extern pascal OSErr AuthLockLocalIdentity(AuthParamBlockPtr paramBlock, Boolean async)
  4481.  THREEWORDINLINE(0x3F3C, 0x215, 0xAA5E);
  4482. extern pascal OSErr AuthAddToLocalIdentityQueue(AuthParamBlockPtr paramBlock, Boolean async)
  4483.  THREEWORDINLINE(0x3F3C, 0x205, 0xAA5E);
  4484. extern pascal OSErr AuthRemoveFromLocalIdentityQueue(AuthParamBlockPtr paramBlock, Boolean async)
  4485.  THREEWORDINLINE(0x3F3C, 0x206, 0xAA5E);
  4486. extern pascal OSErr AuthSetupLocalIdentity(AuthParamBlockPtr paramBlock, Boolean async)
  4487.  THREEWORDINLINE(0x3F3C, 0x216, 0xAA5E);
  4488. extern pascal OSErr AuthChangeLocalIdentity(AuthParamBlockPtr paramBlock, Boolean async)
  4489.  THREEWORDINLINE(0x3F3C, 0x217, 0xAA5E);
  4490. extern pascal OSErr AuthRemoveLocalIdentity(AuthParamBlockPtr paramBlock, Boolean async)
  4491.  THREEWORDINLINE(0x3F3C, 0x218, 0xAA5E);
  4492. extern pascal OSErr DirAddRecord(DirParamBlockPtr paramBlock, Boolean async)
  4493.  THREEWORDINLINE(0x3F3C, 0x109, 0xAA5E);
  4494. extern pascal OSErr DirDeleteRecord(DirParamBlockPtr paramBlock, Boolean async)
  4495.  THREEWORDINLINE(0x3F3C, 0x10A, 0xAA5E);
  4496. extern pascal OSErr DirEnumerateGet(DirParamBlockPtr paramBlock, Boolean async)
  4497.  THREEWORDINLINE(0x3F3C, 0x111, 0xAA5E);
  4498. extern pascal OSErr DirEnumerateParse(DirParamBlockPtr paramBlock, Boolean async)
  4499.  THREEWORDINLINE(0x3F3C, 0x101, 0xAA5E);
  4500. extern pascal OSErr DirFindRecordGet(DirParamBlockPtr paramBlock, Boolean async)
  4501.  THREEWORDINLINE(0x3F3C, 0x140, 0xAA5E);
  4502. extern pascal OSErr DirFindRecordParse(DirParamBlockPtr paramBlock, Boolean async)
  4503.  THREEWORDINLINE(0x3F3C, 0x141, 0xAA5E);
  4504. extern pascal OSErr DirLookupGet(DirParamBlockPtr paramBlock, Boolean async)
  4505.  THREEWORDINLINE(0x3F3C, 0x117, 0xAA5E);
  4506. extern pascal OSErr DirLookupParse(DirParamBlockPtr paramBlock, Boolean async)
  4507.  THREEWORDINLINE(0x3F3C, 0x102, 0xAA5E);
  4508. extern pascal OSErr DirAddAttributeValue(DirParamBlockPtr paramBlock, Boolean async)
  4509.  THREEWORDINLINE(0x3F3C, 0x10B, 0xAA5E);
  4510. extern pascal OSErr DirDeleteAttributeValue(DirParamBlockPtr paramBlock, Boolean async)
  4511.  THREEWORDINLINE(0x3F3C, 0x10C, 0xAA5E);
  4512. extern pascal OSErr DirDeleteAttributeType(DirParamBlockPtr paramBlock, Boolean async)
  4513.  THREEWORDINLINE(0x3F3C, 0x130, 0xAA5E);
  4514. extern pascal OSErr DirChangeAttributeValue(DirParamBlockPtr paramBlock, Boolean async)
  4515.  THREEWORDINLINE(0x3F3C, 0x10D, 0xAA5E);
  4516. extern pascal OSErr DirVerifyAttributeValue(DirParamBlockPtr paramBlock, Boolean async)
  4517.  THREEWORDINLINE(0x3F3C, 0x10E, 0xAA5E);
  4518. extern pascal OSErr DirFindValue(DirParamBlockPtr paramBlock, Boolean async)
  4519.  THREEWORDINLINE(0x3F3C, 0x126, 0xAA5E);
  4520. extern pascal OSErr DirEnumerateAttributeTypesGet(DirParamBlockPtr paramBlock, Boolean async)
  4521.  THREEWORDINLINE(0x3F3C, 0x112, 0xAA5E);
  4522. extern pascal OSErr DirEnumerateAttributeTypesParse(DirParamBlockPtr paramBlock, Boolean async)
  4523.  THREEWORDINLINE(0x3F3C, 0x103, 0xAA5E);
  4524. extern pascal OSErr DirAddPseudonym(DirParamBlockPtr paramBlock, Boolean async)
  4525.  THREEWORDINLINE(0x3F3C, 0x10F, 0xAA5E);
  4526. extern pascal OSErr DirDeletePseudonym(DirParamBlockPtr paramBlock, Boolean async)
  4527.  THREEWORDINLINE(0x3F3C, 0x110, 0xAA5E);
  4528. extern pascal OSErr DirAddAlias(DirParamBlockPtr paramBlock, Boolean async)
  4529.  THREEWORDINLINE(0x3F3C, 0x11C, 0xAA5E);
  4530. extern pascal OSErr DirEnumeratePseudonymGet(DirParamBlockPtr paramBlock, Boolean async)
  4531.  THREEWORDINLINE(0x3F3C, 0x113, 0xAA5E);
  4532. extern pascal OSErr DirEnumeratePseudonymParse(DirParamBlockPtr paramBlock, Boolean async)
  4533.  THREEWORDINLINE(0x3F3C, 0x104, 0xAA5E);
  4534. extern pascal OSErr DirGetNameAndType(DirParamBlockPtr paramBlock, Boolean async)
  4535.  THREEWORDINLINE(0x3F3C, 0x114, 0xAA5E);
  4536. extern pascal OSErr DirSetNameAndType(DirParamBlockPtr paramBlock, Boolean async)
  4537.  THREEWORDINLINE(0x3F3C, 0x115, 0xAA5E);
  4538. extern pascal OSErr DirGetRecordMetaInfo(DirParamBlockPtr paramBlock, Boolean async)
  4539.  THREEWORDINLINE(0x3F3C, 0x116, 0xAA5E);
  4540. extern pascal OSErr DirGetDNodeMetaInfo(DirParamBlockPtr paramBlock, Boolean async)
  4541.  THREEWORDINLINE(0x3F3C, 0x118, 0xAA5E);
  4542. extern pascal OSErr DirGetDirectoryInfo(DirParamBlockPtr paramBlock, Boolean async)
  4543.  THREEWORDINLINE(0x3F3C, 0x119, 0xAA5E);
  4544. extern pascal OSErr DirGetDNodeAccessControlGet(DirParamBlockPtr paramBlock, Boolean async)
  4545.  THREEWORDINLINE(0x3F3C, 0x12A, 0xAA5E);
  4546. extern pascal OSErr DirGetDNodeAccessControlParse(DirParamBlockPtr paramBlock, Boolean async)
  4547.  THREEWORDINLINE(0x3F3C, 0x12F, 0xAA5E);
  4548. extern pascal OSErr DirGetRecordAccessControlGet(DirParamBlockPtr paramBlock, Boolean async)
  4549.  THREEWORDINLINE(0x3F3C, 0x12C, 0xAA5E);
  4550. extern pascal OSErr DirGetRecordAccessControlParse(DirParamBlockPtr paramBlock, Boolean async)
  4551.  THREEWORDINLINE(0x3F3C, 0x134, 0xAA5E);
  4552. extern pascal OSErr DirGetAttributeAccessControlGet(DirParamBlockPtr paramBlock, Boolean async)
  4553.  THREEWORDINLINE(0x3F3C, 0x12E, 0xAA5E);
  4554. extern pascal OSErr DirGetAttributeAccessControlParse(DirParamBlockPtr paramBlock, Boolean async)
  4555.  THREEWORDINLINE(0x3F3C, 0x138, 0xAA5E);
  4556. extern pascal OSErr DirEnumerateDirectoriesGet(DirParamBlockPtr paramBlock, Boolean async)
  4557.  THREEWORDINLINE(0x3F3C, 0x11A, 0xAA5E);
  4558. extern pascal OSErr DirEnumerateDirectoriesParse(DirParamBlockPtr paramBlock, Boolean async)
  4559.  THREEWORDINLINE(0x3F3C, 0x106, 0xAA5E);
  4560. extern pascal OSErr DirMapPathNameToDNodeNumber(DirParamBlockPtr paramBlock, Boolean async)
  4561.  THREEWORDINLINE(0x3F3C, 0x122, 0xAA5E);
  4562. extern pascal OSErr DirMapDNodeNumberToPathName(DirParamBlockPtr paramBlock, Boolean async)
  4563.  THREEWORDINLINE(0x3F3C, 0x123, 0xAA5E);
  4564. extern pascal OSErr DirGetLocalNetworkSpec(DirParamBlockPtr paramBlock, Boolean async)
  4565.  THREEWORDINLINE(0x3F3C, 0x124, 0xAA5E);
  4566. extern pascal OSErr DirGetDNodeInfo(DirParamBlockPtr paramBlock, Boolean async)
  4567.  THREEWORDINLINE(0x3F3C, 0x125, 0xAA5E);
  4568. /*  Trap Dispatchers for Personal Catalog and CSAM Extensions */
  4569. extern pascal OSErr DirCreatePersonalDirectory(DirParamBlockPtr paramBlock)
  4570.  FIVEWORDINLINE(0x7000, 0x1f00, 0x3F3C, 0x11F, 0xAA5E);
  4571. extern pascal OSErr DirOpenPersonalDirectory(DirParamBlockPtr paramBlock)
  4572.  FIVEWORDINLINE(0x7000, 0x1f00, 0x3F3C, 0x11E, 0xAA5E);
  4573. extern pascal OSErr DirClosePersonalDirectory(DirParamBlockPtr paramBlock)
  4574.  FIVEWORDINLINE(0x7000, 0x1f00, 0x3F3C, 0x131, 0xAA5E);
  4575. extern pascal OSErr DirMakePersonalDirectoryRLI(DirParamBlockPtr paramBlock)
  4576.  FIVEWORDINLINE(0x7000, 0x1f00, 0x3F3C, 0x132, 0xAA5E);
  4577. extern pascal OSErr DirAddDSAM(DirParamBlockPtr paramBlock)
  4578.  FIVEWORDINLINE(0x7000, 0x1f00, 0x3F3C, 0x11D, 0xAA5E);
  4579. extern pascal OSErr DirInstantiateDSAM(DirParamBlockPtr paramBlock)
  4580.  FIVEWORDINLINE(0x7000, 0x1f00, 0x3F3C, 0x127, 0xAA5E);
  4581. extern pascal OSErr DirRemoveDSAM(DirParamBlockPtr paramBlock)
  4582.  FIVEWORDINLINE(0x7000, 0x1f00, 0x3F3C, 0x120, 0xAA5E);
  4583. extern pascal OSErr DirAddDSAMDirectory(DirParamBlockPtr paramBlock, Boolean async)
  4584.  THREEWORDINLINE(0x3F3C, 0x133, 0xAA5E);
  4585. extern pascal OSErr DirGetExtendedDirectoriesInfo(DirParamBlockPtr paramBlock, Boolean async)
  4586.  THREEWORDINLINE(0x3F3C, 0x136, 0xAA5E);
  4587. extern pascal OSErr DirGetDirectoryIcon(DirParamBlockPtr paramBlock, Boolean async)
  4588.  THREEWORDINLINE(0x3F3C, 0x121, 0xAA5E);
  4589. extern pascal OSErr DirAddADAPDirectory(DirParamBlockPtr paramBlock, Boolean async)
  4590.  THREEWORDINLINE(0x3F3C, 0x137, 0xAA5E);
  4591. extern pascal OSErr DirRemoveDirectory(DirParamBlockPtr paramBlock, Boolean async)
  4592.  THREEWORDINLINE(0x3F3C, 0x135, 0xAA5E);
  4593. extern pascal OSErr DirNetSearchADAPDirectoriesGet(DirParamBlockPtr paramBlock, Boolean async)
  4594.  THREEWORDINLINE(0x3F3C, 0x108, 0xAA5E);
  4595. extern pascal OSErr DirNetSearchADAPDirectoriesParse(DirParamBlockPtr paramBlock, Boolean async)
  4596.  THREEWORDINLINE(0x3F3C, 0x105, 0xAA5E);
  4597. extern pascal OSErr DirFindADAPDirectoryByNetSearch(DirParamBlockPtr paramBlock, Boolean async)
  4598.  THREEWORDINLINE(0x3F3C, 0x107, 0xAA5E);
  4599. extern pascal OSErr DirGetOCESetupRefNum(DirParamBlockPtr paramBlock, Boolean async)
  4600.  THREEWORDINLINE(0x3F3C, 0x128, 0xAA5E);
  4601. extern pascal OSErr DirAbort(DirParamBlockPtr paramBlock)
  4602.  FIVEWORDINLINE(0x7000, 0x1f00, 0x3F3C, 0x11B, 0xAA5E);
  4603. extern pascal OSErr OCESetupAddDirectoryInfo(AuthParamBlockPtr paramBlock, Boolean async)
  4604.  THREEWORDINLINE(0x3F3C, 0x219, 0xAA5E);
  4605. extern pascal OSErr OCESetupChangeDirectoryInfo(AuthParamBlockPtr paramBlock, Boolean async)
  4606.  THREEWORDINLINE(0x3F3C, 0x21B, 0xAA5E);
  4607. extern pascal OSErr OCESetupRemoveDirectoryInfo(AuthParamBlockPtr paramBlock, Boolean async)
  4608.  THREEWORDINLINE(0x3F3C, 0x20D, 0xAA5E);
  4609. extern pascal OSErr OCESetupGetDirectoryInfo(AuthParamBlockPtr paramBlock, Boolean async)
  4610.  THREEWORDINLINE(0x3F3C, 0x20E, 0xAA5E);
  4611.  
  4612. #if PRAGMA_IMPORT_SUPPORTED
  4613. #pragma import off
  4614. #endif
  4615.  
  4616. #if PRAGMA_ALIGN_SUPPORTED
  4617. #pragma options align=reset
  4618. #endif
  4619.  
  4620. #ifdef __cplusplus
  4621. }
  4622. #endif
  4623.  
  4624. #endif /* __OCEAUTHDIR__ */
  4625.